File tree 2 files changed +38
-0
lines changed
tests/ui/type-alias-impl-trait
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( type_alias_impl_trait) ]
2
+
3
+ fn main ( ) {
4
+ let x = || {
5
+ type Tait = impl Sized ;
6
+ let y: Tait = ( ) ;
7
+ //~^ ERROR: item constrains opaque type that is not in its signature
8
+ //~| ERROR: item constrains opaque type that is not in its signature
9
+ } ;
10
+ }
Original file line number Diff line number Diff line change
1
+ error: item constrains opaque type that is not in its signature
2
+ --> $DIR/nested_in_closure.rs:6:23
3
+ |
4
+ LL | let y: Tait = ();
5
+ | ^^
6
+ |
7
+ = note: this item must have the opaque type in its signature in order to be able to register hidden types
8
+ note: this item must have the opaque type in its signature in order to be able to register hidden types
9
+ --> $DIR/nested_in_closure.rs:3:4
10
+ |
11
+ LL | fn main() {
12
+ | ^^^^
13
+
14
+ error: item constrains opaque type that is not in its signature
15
+ --> $DIR/nested_in_closure.rs:6:23
16
+ |
17
+ LL | let y: Tait = ();
18
+ | ^^
19
+ |
20
+ = note: this item must have the opaque type in its signature in order to be able to register hidden types
21
+ note: this item must have the opaque type in its signature in order to be able to register hidden types
22
+ --> $DIR/nested_in_closure.rs:4:13
23
+ |
24
+ LL | let x = || {
25
+ | ^^
26
+
27
+ error: aborting due to 2 previous errors
28
+
You can’t perform that action at this time.
0 commit comments