File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
compiler/rustc_middle/src/ty
src/test/ui/type-alias-impl-trait Expand file tree Collapse file tree 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 {
13491349 // ignore the inputs to a projection, as they may not appear
13501350 // in the normalized form
13511351 if self . just_constrained {
1352- if let ty:: Projection ( ..) | ty :: Opaque ( .. ) = t. kind ( ) {
1352+ if let ty:: Projection ( ..) = t. kind ( ) {
13531353 return ControlFlow :: CONTINUE ;
13541354 }
13551355 }
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