mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
16 lines
328 B
Rust
16 lines
328 B
Rust
struct BuildData {
|
|
foo: isize,
|
|
bar: f32
|
|
}
|
|
|
|
fn main() {
|
|
let foo = BuildData {
|
|
foo: 0,
|
|
bar: 0.5,
|
|
};
|
|
let x = foo.baa; //~ ERROR no field `baa` on type `BuildData`
|
|
//~| HELP a field with a similar name exists
|
|
//~| SUGGESTION bar
|
|
println!("{}", x);
|
|
}
|