6767{
6868 pub fn canonical_alias < ' t , F > (
6969 & mut self ,
70- env : & dyn TypeEnv < Type = T > ,
70+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
7171 interner : & mut impl TypeContext < Symbol , T > ,
7272 typ : & ' t T ,
7373 mut canonical : F ,
@@ -105,7 +105,7 @@ where
105105
106106 pub fn remove_aliases_to_concrete < ' a > (
107107 & mut self ,
108- env : & dyn TypeEnv < Type = T > ,
108+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
109109 interner : & mut impl TypeContext < Symbol , T > ,
110110 mut typ : T ,
111111 ) -> Result < T , Error > {
@@ -139,7 +139,7 @@ where
139139
140140 pub fn remove_aliases (
141141 & mut self ,
142- env : & dyn TypeEnv < Type = T > ,
142+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
143143 interner : & mut impl TypeContext < Symbol , T > ,
144144 typ : T ,
145145 ) -> Result < T , Error > {
@@ -148,7 +148,7 @@ where
148148
149149 pub fn remove_aliases_predicate (
150150 & mut self ,
151- env : & dyn TypeEnv < Type = T > ,
151+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
152152 interner : & mut impl TypeContext < Symbol , T > ,
153153 mut typ : T ,
154154 mut predicate : impl FnMut ( & AliasData < Symbol , T > ) -> bool ,
@@ -163,7 +163,7 @@ where
163163
164164 pub fn remove_alias (
165165 & mut self ,
166- env : & dyn TypeEnv < Type = T > ,
166+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
167167 interner : & mut impl TypeContext < Symbol , T > ,
168168 typ : & T ,
169169 predicate : impl FnOnce ( & AliasData < Symbol , T > ) -> bool ,
@@ -181,7 +181,7 @@ where
181181
182182 pub fn remove_alias_to_concrete < ' a > (
183183 & mut self ,
184- env : & ' a dyn TypeEnv < Type = T > ,
184+ env : & ' a ( dyn TypeEnv < Type = T > + ' _ ) ,
185185 interner : & mut impl TypeContext < Symbol , T > ,
186186 typ : & ' a T ,
187187 predicate : impl FnOnce ( & AliasData < Symbol , T > ) -> bool ,
@@ -238,7 +238,7 @@ where
238238
239239/// Removes type aliases from `typ` until it is an actual type
240240pub fn remove_aliases < T > (
241- env : & dyn TypeEnv < Type = T > ,
241+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
242242 interner : & mut impl TypeContext < Symbol , T > ,
243243 mut typ : T ,
244244) -> T
@@ -255,8 +255,7 @@ where
255255}
256256
257257pub fn remove_aliases_cow < ' t , T > (
258- env : & dyn TypeEnv < Type = T > ,
259-
258+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
260259 interner : & mut impl TypeContext < Symbol , T > ,
261260 typ : & ' t T ,
262261) -> Cow < ' t , T >
@@ -275,7 +274,7 @@ where
275274/// Resolves aliases until `canonical` returns `true` for an alias in which case it returns the
276275/// type that directly contains that alias
277276pub fn canonical_alias < ' t , F , T > (
278- env : & dyn TypeEnv < Type = T > ,
277+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
279278 interner : & mut impl TypeContext < Symbol , T > ,
280279 typ : & ' t T ,
281280 mut canonical : F ,
@@ -313,7 +312,7 @@ where
313312/// Expand `typ` if it is an alias that can be expanded and return the expanded type.
314313/// Returns `None` if the type is not an alias or the alias could not be expanded.
315314pub fn remove_alias < T > (
316- env : & dyn TypeEnv < Type = T > ,
315+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
317316 interner : & mut impl TypeContext < Symbol , T > ,
318317 typ : & T ,
319318) -> Result < Option < T > , Error >
@@ -338,7 +337,7 @@ where
338337}
339338
340339pub fn peek_alias < ' t , T > (
341- env : & ' t dyn TypeEnv < Type = T > ,
340+ env : & ( dyn TypeEnv < Type = T > + ' _ ) ,
342341 typ : & ' t T ,
343342) -> Result < Option < AliasRef < Symbol , T > > , Error >
344343where
0 commit comments