check_is_object_safe -> is_object_safe
This commit is contained in:
@@ -870,7 +870,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
if let Some(principal) = data.principal() {
|
||||
if !self.infcx.tcx.features().object_safe_for_dispatch {
|
||||
principal.with_self_ty(self.tcx(), self_ty)
|
||||
} else if self.tcx().check_is_object_safe(principal.def_id()) {
|
||||
} else if self.tcx().is_object_safe(principal.def_id()) {
|
||||
principal.with_self_ty(self.tcx(), self_ty)
|
||||
} else {
|
||||
return;
|
||||
|
||||
@@ -1222,7 +1222,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
// `T` -> `Trait`
|
||||
(_, &ty::Dynamic(data, r, ty::Dyn)) => {
|
||||
let mut object_dids = data.auto_traits().chain(data.principal_def_id());
|
||||
if let Some(did) = object_dids.find(|did| !tcx.check_is_object_safe(*did)) {
|
||||
if let Some(did) = object_dids.find(|did| !tcx.is_object_safe(*did)) {
|
||||
return Err(TraitNotObjectSafe(did));
|
||||
}
|
||||
|
||||
|
||||
@@ -798,7 +798,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
}
|
||||
|
||||
ty::PredicateKind::ObjectSafe(trait_def_id) => {
|
||||
if self.tcx().check_is_object_safe(trait_def_id) {
|
||||
if self.tcx().is_object_safe(trait_def_id) {
|
||||
Ok(EvaluatedToOk)
|
||||
} else {
|
||||
Ok(EvaluatedToErr)
|
||||
|
||||
Reference in New Issue
Block a user