This commit is contained in:
Michael Goulet 2024-04-14 10:51:25 -04:00
parent 619e044178
commit 9d72808b1e
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,8 @@
enum Struct<const N: usize> { Variant { x: [(); N] } }
fn test() {
let x = Struct::<0>::Variant;
//~^ ERROR expected value, found struct variant `Struct<0>::Variant`
}
fn main() {}

View file

@ -0,0 +1,9 @@
error[E0533]: expected value, found struct variant `Struct<0>::Variant`
--> $DIR/error-variant-with-turbofishes.rs:4:13
|
LL | let x = Struct::<0>::Variant;
| ^^^^^^^^^^^^^^^^^^^^ not a value
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0533`.