1 // Type arguments in unresolved entities (reporting errors before type checking) 2 // should have their types recorded. 3 4 trait Tr<T> {} 5 local_type()6fn local_type() { 7 let _: Nonexistent<u8, Assoc = u16>; //~ ERROR cannot find type `Nonexistent` in this scope 8 } 9 ufcs_trait()10fn ufcs_trait() { 11 <u8 as Tr<u8>>::nonexistent(); //~ ERROR cannot find method or associated constant `nonexistent` 12 } 13 ufcs_item()14fn ufcs_item() { 15 NonExistent::Assoc::<u8>; //~ ERROR undeclared type `NonExistent` 16 } 17 method()18fn method() { 19 nonexistent.nonexistent::<u8>(); //~ ERROR cannot find value `nonexistent` 20 } 21 closure()22fn closure() { 23 let _ = |a, b: _| -> _ { 0 }; //~ ERROR type annotations needed 24 } 25 main()26fn main() {} 27