Skip to content

Commit 82510b9

Browse files
committed
return when obligation has references_error
1 parent 65445a5 commit 82510b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

+4
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,10 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
899899
return;
900900
}
901901

902+
if obligation.references_error() {
903+
return;
904+
}
905+
902906
candidates.vec.push(TransmutabilityCandidate);
903907
}
904908

0 commit comments

Comments
 (0)