fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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