summaryrefslogtreecommitdiffstats
path: root/src/test/ui/attempted-access-non-fatal.rs
blob: 15deb9e2f609a9c60bde136fb3ce20c7d897b65d (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; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = x.bar; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 0.f; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 2.l; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 12.F; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
    let _ = 34.L; //~ `{integer}` is a primitive type and therefore doesn't have fields [E0610]
}