File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
compiler/rustc_trait_selection/src/traits/query/type_op Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,17 @@ pub fn compute_implied_outlives_bounds_compat_inner<'tcx>(
202202 }
203203 }
204204
205- let pred = match obligation. predicate . kind ( ) . no_bound_vars ( ) {
205+ let pred = if ocx. infcx . next_trait_solver ( ) {
206+ ocx. deeply_normalize (
207+ & ObligationCause :: dummy_with_span ( span) ,
208+ param_env,
209+ obligation. predicate ,
210+ )
211+ . map_err ( |_| NoSolution ) ?
212+ } else {
213+ obligation. predicate
214+ } ;
215+ let pred = match pred. kind ( ) . no_bound_vars ( ) {
206216 None => continue ,
207217 Some ( pred) => pred,
208218 } ;
@@ -240,6 +250,13 @@ pub fn compute_implied_outlives_bounds_compat_inner<'tcx>(
240250 }
241251 }
242252
253+ outlives_bounds. extend (
254+ ocx. infcx
255+ . take_registered_region_obligations ( )
256+ . into_iter ( )
257+ . map ( |o| ty:: OutlivesPredicate ( o. sup_type . into ( ) , o. sub_region ) ) ,
258+ ) ;
259+
243260 // This call to `select_all_or_error` is necessary to constrain inference variables, which we
244261 // use further down when computing the implied bounds.
245262 match ocx. select_all_or_error ( ) . as_slice ( ) {
Original file line number Diff line number Diff line change 11#![ crate_name = "bevy_ecs" ]
22
3+ //@ revisions: current next
4+ //@ ignore-compare-mode-next-solver (explicit revisions)
5+ //@[next] compile-flags: -Znext-solver
36//@ check-pass
47
58// We currently special case bevy from erroring on incorrect implied bounds
You can’t perform that action at this time.
0 commit comments