Commit d63f82e 1 parent c51871c commit d63f82e Copy full SHA for d63f82e
File tree 2 files changed +18
-1
lines changed
compiler/rustc_middle/src/ty
src/test/ui/type-alias-impl-trait
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1349,7 +1349,7 @@ impl<'tcx> TypeVisitor<'tcx> for LateBoundRegionsCollector {
1349
1349
// ignore the inputs to a projection, as they may not appear
1350
1350
// in the normalized form
1351
1351
if self . just_constrained {
1352
- if let ty:: Projection ( ..) | ty :: Opaque ( .. ) = t. kind ( ) {
1352
+ if let ty:: Projection ( ..) = t. kind ( ) {
1353
1353
return ControlFlow :: CONTINUE ;
1354
1354
}
1355
1355
}
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+
3
+ #![ feature( type_alias_impl_trait) ]
4
+
5
+ mod foo {
6
+ type Ty < ' a > = impl Sized ;
7
+ fn defining ( s : & str ) -> Ty < ' _ > { s }
8
+ fn execute ( ty : Ty < ' _ > ) -> & str { todo ! ( ) }
9
+ }
10
+
11
+ mod bar {
12
+ type Ty < ' a > = impl FnOnce ( ) -> & ' a str ;
13
+ fn defining ( s : & str ) -> Ty < ' _ > { move || s }
14
+ fn execute ( ty : Ty < ' _ > ) -> & str { ty ( ) }
15
+ }
16
+
17
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments