1 warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2 --> $DIR/fn-const-param-infer.rs:1:12
4 LL | #![feature(const_generics, const_compare_raw_pointers)]
7 = note: `#[warn(incomplete_features)]` on by default
9 error[E0308]: mismatched types
10 --> $DIR/fn-const-param-infer.rs:16:31
12 LL | let _: Checked<not_one> = Checked::<not_two>;
13 | ---------------- ^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two`
15 | expected due to this
17 = note: expected struct `Checked<not_one>`
18 found struct `Checked<not_two>`
20 error[E0308]: mismatched types
21 --> $DIR/fn-const-param-infer.rs:20:24
23 LL | let _ = Checked::<{generic_arg::<u32>}>;
24 | ^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
26 = note: expected fn pointer `fn(usize) -> _`
27 found fn item `fn(u32) -> _ {generic_arg::<u32>}`
29 error[E0282]: type annotations needed
30 --> $DIR/fn-const-param-infer.rs:22:23
32 LL | let _ = Checked::<generic>;
33 | ^^^^^^^ cannot infer type for type parameter `T` declared on the function `generic`
35 error[E0308]: mismatched types
36 --> $DIR/fn-const-param-infer.rs:25:40
38 LL | let _: Checked<{generic::<u32>}> = Checked::<{generic::<u16>}>;
39 | ------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::<u32>`, found `generic::<u16>`
41 | expected due to this
43 = note: expected struct `Checked<generic::<u32>>`
44 found struct `Checked<generic::<u16>>`
46 error: aborting due to 4 previous errors
48 Some errors have detailed explanations: E0282, E0308.
49 For more information about an error, try `rustc --explain E0282`.