summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs/struct-fields-typo.rs
blob: 0e9b2ae5145d7233f3e44151283d48d0b651dc78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}