Merge attrs, better validation
This commit is contained in:
@@ -1586,6 +1586,10 @@ fn assemble_candidates_from_object_ty<'cx, 'tcx>(
|
||||
|
||||
let tcx = selcx.tcx();
|
||||
|
||||
if !tcx.trait_def(obligation.predicate.trait_def_id(tcx)).implement_via_object {
|
||||
return;
|
||||
}
|
||||
|
||||
let self_ty = obligation.predicate.self_ty();
|
||||
let object_ty = selcx.infcx.shallow_resolve(self_ty);
|
||||
let data = match object_ty.kind() {
|
||||
|
||||
@@ -554,6 +554,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
"assemble_candidates_from_object_ty",
|
||||
);
|
||||
|
||||
if !self.tcx().trait_def(obligation.predicate.def_id()).implement_via_object {
|
||||
return;
|
||||
}
|
||||
|
||||
self.infcx.probe(|_snapshot| {
|
||||
if obligation.has_non_region_late_bound() {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user