]> git.lizzy.rs Git - rust.git/blob - src/test/ui/span/method-and-field-eager-resolution.rs
Rollup merge of #87922 - Manishearth:c-enum-target-spec, r=nagisa,eddyb
[rust.git] / src / test / ui / span / method-and-field-eager-resolution.rs
1 // Test that spans get only base in eager type resolution (structurally_resolve_type).
2
3 fn main() {
4     let mut x = Default::default();
5     x.0;
6     //~^ ERROR type annotations needed
7     x = 1;
8 }
9
10 fn foo() {
11     let mut x = Default::default();
12     x[0];
13     //~^ ERROR type annotations needed
14     x = 1;
15 }