mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 05:13:35 +00:00
Merge pull request #20664 from ChayimFriedman2/coerce-ns
Some checks are pending
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Some checks are pending
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
This commit is contained in:
commit
cd31e11f94
84 changed files with 9412 additions and 3998 deletions
|
|
@ -2549,11 +2549,13 @@ impl Function {
|
|||
let target_feature_is_safe_in_target =
|
||||
match &caller.krate(db).id.workspace_data(db).target {
|
||||
Ok(target) => hir_ty::target_feature_is_safe_in_target(target),
|
||||
Err(_) => false,
|
||||
Err(_) => hir_ty::TargetFeatureIsSafeInTarget::No,
|
||||
};
|
||||
(target_features, target_feature_is_safe_in_target)
|
||||
})
|
||||
.unwrap_or_else(|| (hir_ty::TargetFeatures::default(), false));
|
||||
.unwrap_or_else(|| {
|
||||
(hir_ty::TargetFeatures::default(), hir_ty::TargetFeatureIsSafeInTarget::No)
|
||||
});
|
||||
matches!(
|
||||
hir_ty::is_fn_unsafe_to_call(
|
||||
db,
|
||||
|
|
@ -4660,7 +4662,7 @@ impl Closure {
|
|||
.iter()
|
||||
.map(|capture| Type {
|
||||
env: db.trait_environment_for_body(owner),
|
||||
ty: capture.ty(&self.subst),
|
||||
ty: capture.ty(db, &self.subst),
|
||||
_pd: PhantomCovariantLifetime::new(),
|
||||
})
|
||||
.collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue