1 error[E0308]: mismatched types
2 --> $DIR/assoc-ct-for-assoc-method.rs:11:18
4 LL | let x: i32 = MyS::foo;
5 | --- ^^^^^^^^ expected `i32`, found fn item
9 = note: expected type `i32`
10 found fn item `fn() -> MyS {MyS::foo}`
11 help: try referring to the associated const `FOO` instead
13 LL | let x: i32 = MyS::FOO;
16 error[E0308]: mismatched types
17 --> $DIR/assoc-ct-for-assoc-method.rs:15:18
19 LL | let z: i32 = i32::max;
20 | --- ^^^^^^^^ expected `i32`, found fn item
22 | expected due to this
24 = note: expected type `i32`
25 found fn item `fn(i32, i32) -> i32 {<i32 as Ord>::max}`
26 help: try referring to the associated const `MAX` instead
28 LL | let z: i32 = i32::MAX;
31 error[E0369]: cannot subtract `{integer}` from `fn(i32, i32) -> i32 {<i32 as Ord>::max}`
32 --> $DIR/assoc-ct-for-assoc-method.rs:22:27
34 LL | let y: i32 = i32::max - 42;
35 | -------- ^ -- {integer}
37 | fn(i32, i32) -> i32 {<i32 as Ord>::max}
39 help: use parentheses to call this associated function
41 LL | let y: i32 = i32::max(/* i32 */, /* i32 */) - 42;
42 | ++++++++++++++++++++++
44 error: aborting due to 3 previous errors
46 Some errors have detailed explanations: E0308, E0369.
47 For more information about an error, try `rustc --explain E0308`.