summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/types-mismatch-const-args.full.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/types-mismatch-const-args.full.stderr')
-rw-r--r--src/test/ui/const-generics/types-mismatch-const-args.full.stderr34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/types-mismatch-const-args.full.stderr b/src/test/ui/const-generics/types-mismatch-const-args.full.stderr
new file mode 100644
index 000000000..486506239
--- /dev/null
+++ b/src/test/ui/const-generics/types-mismatch-const-args.full.stderr
@@ -0,0 +1,34 @@
+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`
+ |
+ = note: expected type `2`
+ found type `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`.