summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs
new file mode 100644
index 000000000..1254b4435
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/non_local_anon_const_diagnostics.rs
@@ -0,0 +1,16 @@
+// aux-build:anon_const_non_local.rs
+
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+extern crate anon_const_non_local;
+
+fn bar<const M: usize>()
+where
+ [(); M + 1]:,
+{
+ let _: anon_const_non_local::Foo<2> = anon_const_non_local::foo::<M>();
+ //~^ ERROR: mismatched types
+}
+
+fn main() {}