diff options
Diffstat (limited to 'tests/ui/const-generics/types-mismatch-const-args.min.stderr')
-rw-r--r-- | tests/ui/const-generics/types-mismatch-const-args.min.stderr | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/ui/const-generics/types-mismatch-const-args.min.stderr b/tests/ui/const-generics/types-mismatch-const-args.min.stderr new file mode 100644 index 000000000..6ac93a08d --- /dev/null +++ b/tests/ui/const-generics/types-mismatch-const-args.min.stderr @@ -0,0 +1,36 @@ +error[E0308]: mismatched types + --> $DIR/types-mismatch-const-args.rs:14:41 + | +LL | let _: A<'a, u32, {2u32}, {3u32}> = A::<'a, u32, {2u32 + 2u32}, {3u32}> { data: PhantomData }; + | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `2`, found `4` + | | + | expected due to this + | + = note: expected struct `A<'_, _, 2, _>` + found struct `A<'_, _, 4, _>` + +error[E0308]: mismatched types + --> $DIR/types-mismatch-const-args.rs:16:41 + | +LL | let _: A<'a, u16, {2u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; + | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32` + | | + | expected due to this + | + = note: expected struct `A<'a, u16, _, _>` + found struct `A<'b, u32, _, _>` + +error[E0308]: mismatched types + --> $DIR/types-mismatch-const-args.rs:18:41 + | +LL | let _: A<'a, u16, {4u32}, {3u32}> = A::<'b, u32, {2u32}, {3u32}> { data: PhantomData }; + | -------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `u32` + | | + | expected due to this + | + = note: expected struct `A<'a, u16, 4, _>` + found struct `A<'b, u32, 2, _>` + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0308`. |