summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/issue-103869.rs
blob: 729079e050115d504d7a946ab954eee89a9fe2f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-rustfix

enum VecOrMap {
    //~^ HELP: perhaps you meant to use `struct` here
    vec: Vec<usize>,
    //~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `:`
    //~| HELP: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
}

fn main() {
    let o = VecOrMap { vec: vec![1, 2, 3] };
    println!("{:?}", o.vec);
}