summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/method-and-field-eager-resolution.rs
blob: a0f0d8810e5c7c6242d1d330e2248f8934767507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test that spans get only base in eager type resolution (structurally_resolve_type).

fn main() {
    let mut x = Default::default();
    //~^ ERROR type annotations needed
    x.0;
    x = 1;
}

fn foo() {
    let mut x = Default::default();
    //~^ ERROR type annotations needed
    x[0];
    x = 1;
}