Skip to content

Commit 74454c4

Browse files
committed
Add comment about the only way to prove NotImplemented here
1 parent 2e9fb8b commit 74454c4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
256256

257257
let mut candidates = SelectionCandidateSet { vec: Vec::new(), ambiguous: false };
258258

259+
// The only way to prove a NotImplemented(T: Foo) predicate is via a negative impl.
260+
// There are no compiler built-in rules for this.
259261
if obligation.polarity() == ty::ImplPolarity::Negative {
260262
self.assemble_candidates_from_impls(obligation, &mut candidates);
261263
} else {

0 commit comments

Comments
 (0)