|
| 1 | +warning: the feature `const_generics` is incomplete and may cause the compiler to crash |
| 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 |
| 8 | + |
| 9 | +error[E0308]: mismatched types |
| 10 | + --> $DIR/types-mismatch-const-args.rs:13:41 |
| 11 | + | |
| 12 | +LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {4u32}, {3u32}> { data: PhantomData }; |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2u32`, found `4u32` |
| 14 | + | |
| 15 | + = note: expected type `A<'_, _, 2u32, _>` |
| 16 | + found type `A<'_, _, 4u32, _>` |
| 17 | + |
| 18 | +error[E0308]: mismatched types |
| 19 | + --> $DIR/types-mismatch-const-args.rs:15:41 |
| 20 | + | |
| 21 | +LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; |
| 22 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u16, found u32 |
| 23 | + | |
| 24 | + = note: expected type `A<'a, u16, _, _>` |
| 25 | + found type `A<'b, u32, _, _>` |
| 26 | + |
| 27 | +error: aborting due to 2 previous errors |
| 28 | + |
| 29 | +For more information about this error, try `rustc --explain E0308`. |
0 commit comments