summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr')
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr b/src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
new file mode 100644
index 000000000..da5194696
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/const_kind_expr/wf_obligation.stderr
@@ -0,0 +1,20 @@
+error[E0308]: mismatched types
+ --> $DIR/wf_obligation.rs:17:17
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^^^^^^^^^^^^^^ expected `N + 1 + M`, found `L + 1 + L`
+ |
+ = note: expected constant `N + 1 + M`
+ found constant `L + 1 + L`
+
+error: unconstrained generic constant
+ --> $DIR/wf_obligation.rs:17:22
+ |
+LL | foo::<_, L>([(); L + 1 + L]);
+ | ^^^^^^^^^
+ |
+ = help: try adding a `where` bound using this expression: `where [(); L + 1 + L]:`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.