Skip to content

Commit 132409f

Browse files
committed
Assemple trait alias candidates for negative polarity
This doesn't work properly yet, we would probably need to implement an `assembly_neg_candidates` and consider things like `T: !AB` as `T: !A` || `T: !B`
1 parent da79fa9 commit 132409f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
259259
// The only way to prove a NotImplemented(T: Foo) predicate is via a negative impl.
260260
// There are no compiler built-in rules for this.
261261
if obligation.polarity() == ty::ImplPolarity::Negative {
262+
self.assemble_candidates_for_trait_alias(obligation, &mut candidates);
262263
self.assemble_candidates_from_impls(obligation, &mut candidates);
263264
} else {
264265
self.assemble_candidates_for_trait_alias(obligation, &mut candidates);

0 commit comments

Comments
 (0)