diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-26 20:33:54 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-26 20:33:54 +0000 |
| commit | 1ce4b37900cf0c7f5e146b866b5a8fae2b93f9fc (patch) | |
| tree | 14053358366bf1c402c4d7af58b4067710514b4c /compiler/rustc_trait_selection/src/traits/coherence.rs | |
| parent | 96bd50dd47b645efa52d1312b9cc32e507d9cd76 (diff) | |
| download | rust-1ce4b37900cf0c7f5e146b866b5a8fae2b93f9fc.tar.gz rust-1ce4b37900cf0c7f5e146b866b5a8fae2b93f9fc.zip | |
Don't elaborate non-obligations into obligations
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/coherence.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/coherence.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 98e00e8223b..03ba125cf2b 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -367,8 +367,8 @@ fn negative_impl_exists<'tcx>( } // Try to prove a negative obligation exists for super predicates - for o in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) { - if resolve_negative_obligation(infcx.fork(), &o, body_def_id) { + for pred in util::elaborate_predicates(infcx.tcx, iter::once(o.predicate)) { + if resolve_negative_obligation(infcx.fork(), &o.with(infcx.tcx, pred), body_def_id) { return true; } } |
