check_is_object_safe -> is_object_safe
This commit is contained in:
@@ -881,7 +881,7 @@ fn check_object_unsafe_self_trait_by_name(tcx: TyCtxt<'_>, item: &hir::TraitItem
|
||||
_ => {}
|
||||
}
|
||||
if !trait_should_be_self.is_empty() {
|
||||
if tcx.check_is_object_safe(trait_def_id) {
|
||||
if tcx.is_object_safe(trait_def_id) {
|
||||
return;
|
||||
}
|
||||
let sugg = trait_should_be_self.iter().map(|span| (*span, "Self".to_string())).collect();
|
||||
|
||||
@@ -191,7 +191,7 @@ fn check_object_overlap<'tcx>(
|
||||
});
|
||||
|
||||
for component_def_id in component_def_ids {
|
||||
if !tcx.check_is_object_safe(component_def_id) {
|
||||
if !tcx.is_object_safe(component_def_id) {
|
||||
// Without the 'object_safe_for_dispatch' feature this is an error
|
||||
// which will be reported by wfcheck. Ignore it here.
|
||||
// This is tested by `coherence-impl-trait-for-trait-object-safe.rs`.
|
||||
|
||||
@@ -182,7 +182,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
||||
// For recursive traits, don't downgrade the error. (#119652)
|
||||
is_downgradable = false;
|
||||
}
|
||||
tcx.check_is_object_safe(id)
|
||||
tcx.is_object_safe(id)
|
||||
}
|
||||
_ => false,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user