rust/tests/ui/span/method-and-field-eager-resolution.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
307 B
Rust
Raw Normal View History

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