]>
Commit | Line | Data |
---|---|---|
f9f354fc | 1 | warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes |
e74abb32 XL |
2 | --> $DIR/types-mismatch-const-args.rs:1:12 |
3 | | | |
4 | LL | #![feature(const_generics)] | |
5 | | ^^^^^^^^^^^^^^ | |
6 | | | |
7 | = note: `#[warn(incomplete_features)]` on by default | |
f9f354fc | 8 | = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information |
e74abb32 XL |
9 | |
10 | error[E0308]: mismatched types | |
11 | --> $DIR/types-mismatch-const-args.rs:13:41 | |
12 | | | |
13 | LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData }; | |
f035d41b | 14 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2_u32`, found `4_u32` |
e74abb32 | 15 | | |
f035d41b XL |
16 | = note: expected type `2_u32` |
17 | found type `4_u32` | |
e74abb32 XL |
18 | |
19 | error[E0308]: mismatched types | |
20 | --> $DIR/types-mismatch-const-args.rs:15:41 | |
21 | | | |
22 | LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; | |
60c5eb7d XL |
23 | | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32` |
24 | | | | |
25 | | expected due to this | |
e74abb32 | 26 | | |
f9f354fc XL |
27 | = note: expected struct `A<'a, u16, {2u32}, {3u32}>` |
28 | found struct `A<'b, u32, {2u32}, {3u32}>` | |
e74abb32 | 29 | |
ba9703b0 | 30 | error: aborting due to 2 previous errors; 1 warning emitted |
e74abb32 XL |
31 | |
32 | For more information about this error, try `rustc --explain E0308`. |