mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
14 lines
399 B
Rust
14 lines
399 B
Rust
//@ run-rustfix
|
|
|
|
struct 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);
|
|
}
|