Add test
This commit is contained in:
parent
619e044178
commit
9d72808b1e
2 changed files with 17 additions and 0 deletions
8
tests/ui/enum/error-variant-with-turbofishes.rs
Normal file
8
tests/ui/enum/error-variant-with-turbofishes.rs
Normal 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() {}
|
9
tests/ui/enum/error-variant-with-turbofishes.stderr
Normal file
9
tests/ui/enum/error-variant-with-turbofishes.stderr
Normal 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`.
|
Loading…
Add table
Reference in a new issue