File tree 2 files changed +10
-2
lines changed
compiler/rustc_trait_selection/src
tests/ui/traits/next-solver
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,13 @@ impl<'tcx> InferCtxtRegionExt<'tcx> for InferCtxt<'tcx> {
24
24
let ty = self . resolve_vars_if_possible ( ty) ;
25
25
26
26
if self . next_trait_solver ( ) {
27
- crate :: solve:: deeply_normalize (
27
+ crate :: solve:: deeply_normalize_with_skipped_universes (
28
28
self . at (
29
29
& ObligationCause :: dummy_with_span ( origin. span ( ) ) ,
30
30
outlives_env. param_env ,
31
31
) ,
32
32
ty,
33
+ vec ! [ None ; ty. outer_exclusive_binder( ) . as_usize( ) ] ,
33
34
)
34
35
. map_err ( |_| ty)
35
36
} else {
Original file line number Diff line number Diff line change 1
- // revisions: normalize_param_env normalize_obligation
1
+ // revisions: normalize_param_env normalize_obligation hrtb
2
2
// check-pass
3
3
// compile-flags: -Znext-solver
4
4
@@ -7,16 +7,23 @@ trait Foo {
7
7
type Gat < ' a > where <Self as Mirror >:: Assoc : ' a ;
8
8
#[ cfg( normalize_obligation) ]
9
9
type Gat < ' a > where Self : ' a ;
10
+ #[ cfg( hrtb) ]
11
+ type Gat < ' b > where for < ' a > <Self as MirrorRegion < ' a > >:: Assoc : ' b ;
10
12
}
11
13
12
14
trait Mirror { type Assoc : ?Sized ; }
13
15
impl < T : ?Sized > Mirror for T { type Assoc = T ; }
14
16
17
+ trait MirrorRegion < ' a > { type Assoc : ?Sized ; }
18
+ impl < ' a , T > MirrorRegion < ' a > for T { type Assoc = T ; }
19
+
15
20
impl < T > Foo for T {
16
21
#[ cfg( normalize_param_env) ]
17
22
type Gat < ' a > = i32 where T : ' a ;
18
23
#[ cfg( normalize_obligation) ]
19
24
type Gat < ' a > = i32 where <T as Mirror >:: Assoc : ' a ;
25
+ #[ cfg( hrtb) ]
26
+ type Gat < ' b > = i32 where Self : ' b ;
20
27
}
21
28
22
29
fn main ( ) { }
You can’t perform that action at this time.
0 commit comments