1 fn foo(a: usize, b: usize) -> usize { a }
3 fn bar() -> usize { 42 }
5 struct S(usize, usize);
13 fn baz(x: usize, y: usize) -> usize { x }
14 fn bat(x: usize) -> usize { 42 }
15 fn bax(x: usize) -> usize { 42 }
16 fn bach(x: usize) -> usize;
17 fn ban(&self) -> usize { 42 }
18 fn bal(&self) -> usize;
24 fn bach(x: usize) -> usize { 42 }
25 fn bal(&self) -> usize { 42 }
29 let _: usize = foo; //~ ERROR mismatched types
30 let _: S = S; //~ ERROR mismatched types
31 let _: usize = bar; //~ ERROR mismatched types
32 let _: V = V; //~ ERROR mismatched types
33 let _: usize = T::baz; //~ ERROR mismatched types
34 let _: usize = T::bat; //~ ERROR mismatched types
35 let _: E = E::A; //~ ERROR mismatched types
36 let _: E = E::B; //~ ERROR expected value, found struct variant `E::B`
37 let _: usize = X::baz; //~ ERROR mismatched types
38 let _: usize = X::bat; //~ ERROR mismatched types
39 let _: usize = X::bax; //~ ERROR mismatched types
40 let _: usize = X::bach; //~ ERROR mismatched types
41 let _: usize = X::ban; //~ ERROR mismatched types
42 let _: usize = X::bal; //~ ERROR mismatched types
43 let _: usize = X.ban; //~ ERROR attempted to take value of method
44 let _: usize = X.bal; //~ ERROR attempted to take value of method
46 let _: usize = closure; //~ ERROR mismatched types