rust/src/test/ui/span/method-and-field-eager-resolution.rs
2018-12-25 21:08:33 -07:00

15 lines
307 B
Rust

// Test that spans get only base in eager type resolution (structurally_resolve_type).
fn main() {
let mut x = Default::default();
x.0;
//~^ ERROR type annotations needed
x = 1;
}
fn foo() {
let mut x = Default::default();
x[0];
//~^ ERROR type annotations needed
x = 1;
}