about summary refs log tree commit diff
path: root/tests/ui/typeck/attempted-access-non-fatal.rs
blob: ba391cfa486dca29629dfd686bd855c00718941a (plain)
1
2
3
4
5
6
7
8
9
10
// Check that bogus field access is non-fatal
fn main() {
    let x = 0;
    let _ = x.foo; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = x.bar; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 0.f; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 2.l; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 12.F; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 34.L; //~ ERROR `{integer}` is a primitive type and therefore doesn't have fields [E0610]
}