Skip to content

Commit 8642258

Browse files
committed
Cleanup type-alias-enum-variants.rs test.
1 parent 0d27995 commit 8642258

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
// Check that a generic type for an `enum` admits type application
2+
// on both the type constructor and the generic type's variant.
3+
//
4+
// Also check that a type alias to said generic type admits type application
5+
// on the type constructor but *NOT* the variant.
6+
17
type Alias<T> = Option<T>;
28

39
fn main() {
410
let _ = Option::<u8>::None; // OK
511
let _ = Option::None::<u8>; // OK (Lint in future!)
612
let _ = Alias::<u8>::None; // OK
7-
let _ = Alias::None::<u8>; // Error
8-
//~^ type arguments are not allowed for this type
13+
let _ = Alias::None::<u8>; //~ ERROR type arguments are not allowed for this type
914
}

src/test/ui/type-alias-enum-variants/type-alias-enum-variants.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0109]: type arguments are not allowed for this type
2-
--> $DIR/type-alias-enum-variants.rs:7:27
2+
--> $DIR/type-alias-enum-variants.rs:13:27
33
|
4-
LL | let _ = Alias::None::<u8>; // Error
4+
LL | let _ = Alias::None::<u8>;
55
| ^^ type argument not allowed
66

77
error: aborting due to previous error

0 commit comments

Comments
 (0)