mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Merge pull request #18490 from ShoyuVanilla/dyn-compat-rename
minor: Rename `dyn compatible` to `dyn-compatible`
This commit is contained in:
commit
1042a8c22c
5 changed files with 9 additions and 8 deletions
|
@ -381,8 +381,9 @@ impl chalk_solve::RustIrDatabase<Interner> for ChalkContext<'_> {
|
|||
TyKind::Error.intern(Interner)
|
||||
}
|
||||
|
||||
// object safety was renamed to dyn-compatibility but still remains here in chalk.
|
||||
// This will be removed since we are going to migrate to next-gen trait solver.
|
||||
fn is_object_safe(&self, trait_id: chalk_ir::TraitId<Interner>) -> bool {
|
||||
// FIXME: When cargo is updated, change to dyn_compatibility
|
||||
let trait_ = from_chalk_trait_id(trait_id);
|
||||
crate::dyn_compatibility::dyn_compatibility(self.db, trait_).is_none()
|
||||
}
|
||||
|
|
|
@ -472,7 +472,7 @@ fn receiver_is_dispatchable(
|
|||
return false;
|
||||
};
|
||||
|
||||
// `self: Self` can't be dispatched on, but this is already considered dyn compatible
|
||||
// `self: Self` can't be dispatched on, but this is already considered dyn-compatible
|
||||
// See rustc's comment on https://github.com/rust-lang/rust/blob/3f121b9461cce02a703a0e7e450568849dfaa074/compiler/rustc_trait_selection/src/traits/object_safety.rs#L433-L437
|
||||
if sig
|
||||
.skip_binders()
|
||||
|
|
|
@ -66,7 +66,7 @@ fn check_dyn_compatibility<'a>(
|
|||
});
|
||||
ControlFlow::Continue(())
|
||||
});
|
||||
assert_eq!(osvs, expected, "Dyn Compatibility violations for `{name}` do not match;");
|
||||
assert_eq!(osvs, expected, "dyn-compatibility violations for `{name}` do not match;");
|
||||
}
|
||||
|
||||
let remains: Vec<_> = expected.keys().collect();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue