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