rust/tests/ui/span/method-and-field-eager-resolution.rs
2023-01-11 09:32:08 +00:00

16 lines
307 B
Rust

// 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;
}