about summary refs log tree commit diff
path: root/src/test/ui/structs/struct-fields-typo.rs
blob: b435a0a47773ded5a69c93fb01889c0af5fbc4e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
struct BuildData {
    foo: isize,
    bar: f32
}

fn main() {
    let foo = BuildData {
        foo: 0,
        bar: 0.5,
    };
    let x = foo.baa;//~ no field `baa` on type `BuildData`
    //~^ did you mean `bar`?
    println!("{}", x);
}