]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/fn-const-param-infer.stderr
Update const_forget.rs
[rust.git] / src / test / ui / const-generics / fn-const-param-infer.stderr
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
10   --> $DIR/fn-const-param-infer.rs:16:31
11    |
12 LL |     let _: Checked<not_one> = Checked::<not_two>;
13    |            ----------------   ^^^^^^^^^^^^^^^^^^ expected `not_one`, found `not_two`
14    |            |
15    |            expected due to this
16    |
17    = note: expected struct `Checked<not_one>`
18               found struct `Checked<not_two>`
19
20 error[E0308]: mismatched types
21   --> $DIR/fn-const-param-infer.rs:20:24
22    |
23 LL |     let _ = Checked::<{generic_arg::<u32>}>;
24    |                        ^^^^^^^^^^^^^^^^^^ expected `usize`, found `u32`
25    |
26    = note: expected fn pointer `fn(usize) -> _`
27                  found fn item `fn(u32) -> _ {generic_arg::<u32>}`
28
29 error[E0282]: type annotations needed
30   --> $DIR/fn-const-param-infer.rs:22:23
31    |
32 LL |     let _ = Checked::<generic>;
33    |                       ^^^^^^^ cannot infer type for type parameter `T` declared on the function `generic`
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>}>;
39    |            -------------------------   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `generic::<u32>`, found `generic::<u16>`
40    |            |
41    |            expected due to this
42    |
43    = note: expected struct `Checked<generic::<u32>>`
44               found struct `Checked<generic::<u16>>`
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`.