File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
compiler/rustc_borrowck/src/type_check Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> {
301301 if matches ! ( tcx. def_kind( defining_ty_def_id) , DefKind :: AssocFn | DefKind :: AssocConst ) {
302302 for & ( ty, _) in tcx. assumed_wf_types ( tcx. local_parent ( defining_ty_def_id) ) {
303303 let result: Result < _ , ErrorGuaranteed > = param_env
304- . and ( type_op :: normalize :: Normalize { value : ty } )
304+ . and ( DeeplyNormalize { value : ty } )
305305 . fully_perform ( self . infcx , span) ;
306306 let Ok ( TypeOpOutput { output : norm_ty, constraints : c, .. } ) = result else {
307307 continue ;
Original file line number Diff line number Diff line change 1+ //@ check-pass
2+ //@ revisions: current next
3+ //@ ignore-compare-mode-next-solver (explicit revisions)
4+ //@[next] compile-flags: -Znext-solver
5+
6+ // Make sure that we can normalize `<T as Ref<'a>>::Assoc` to `&'a T` and get
7+ // its implied bounds in impl header.
8+
9+ trait Ref < ' a > {
10+ type Assoc ;
11+ }
12+ impl < ' a , T > Ref < ' a > for T where T : ' a {
13+ type Assoc = & ' a T ;
14+ }
15+
16+ fn outlives < ' a , T : ' a > ( ) { }
17+
18+ trait Trait < ' a , T > {
19+ fn test ( ) ;
20+ }
21+
22+ impl < ' a , T > Trait < ' a , T > for <T as Ref < ' a > >:: Assoc {
23+ fn test ( ) {
24+ outlives :: < ' a , T > ( ) ;
25+ }
26+ }
27+
28+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments