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