diff options
| author | Michael Goulet <michael@errs.io> | 2023-02-02 21:22:02 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-04-11 17:45:42 +0000 |
| commit | 7ec72efe10df28fcf5c6ec13c2a487572041be59 (patch) | |
| tree | 7f37906cf05513c69c824bb70873c88feeb09611 /compiler/rustc_trait_selection/src | |
| parent | 4560b61cd15aa026a03a64c99ead1edf7896826f (diff) | |
| download | rust-7ec72efe10df28fcf5c6ec13c2a487572041be59.tar.gz rust-7ec72efe10df28fcf5c6ec13c2a487572041be59.zip | |
Allow the elaborator to only filter to real supertraits
Diffstat (limited to 'compiler/rustc_trait_selection/src')
| -rw-r--r-- | compiler/rustc_trait_selection/src/solve/assembly/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs index 12ee80b6722..3fb1d49b338 100644 --- a/compiler/rustc_trait_selection/src/solve/assembly/mod.rs +++ b/compiler/rustc_trait_selection/src/solve/assembly/mod.rs @@ -498,7 +498,10 @@ impl<'tcx> EvalCtxt<'_, 'tcx> { let tcx = self.tcx(); let own_bounds: FxIndexSet<_> = bounds.iter().map(|bound| bound.with_self_ty(tcx, self_ty)).collect(); - for assumption in elaborate(tcx, own_bounds.iter().copied()) { + for assumption in elaborate(tcx, own_bounds.iter().copied()) + // we only care about bounds that match the `Self` type + .filter_only_self() + { // FIXME: Predicates are fully elaborated in the object type's existential bounds // list. We want to only consider these pre-elaborated projections, and not other // projection predicates that we reach by elaborating the principal trait ref, |
