Skip to content

Commit 9d72808

Browse files
Add test
1 parent 619e044 commit 9d72808

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
enum Struct<const N: usize> { Variant { x: [(); N] } }
2+
3+
fn test() {
4+
let x = Struct::<0>::Variant;
5+
//~^ ERROR expected value, found struct variant `Struct<0>::Variant`
6+
}
7+
8+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
error[E0533]: expected value, found struct variant `Struct<0>::Variant`
2+
--> $DIR/error-variant-with-turbofishes.rs:4:13
3+
|
4+
LL | let x = Struct::<0>::Variant;
5+
| ^^^^^^^^^^^^^^^^^^^^ not a value
6+
7+
error: aborting due to 1 previous error
8+
9+
For more information about this error, try `rustc --explain E0533`.

0 commit comments

Comments
 (0)