enum Test {
Variant,
Variant2(&'static str)
}
fn main(){
let y = Test::Variant2("Hello");
let x = Test::Variant("World");
}
results in
<anon>:8:13: 8:35 error: expected function, found `Test`
<anon>:8 let x = Test::Variant("World");
^~~~~~~~~~~~~~~~~~~~~~
The error should say something about variant not being able to contain any data instead.
results in
The error should say something about variant not being able to contain any data instead.