summaryrefslogtreecommitdiff
path: root/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs')
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs
new file mode 100644
index 00000000000..b0e3b13cc1e
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs
@@ -0,0 +1,12 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+#[derive(PartialEq, Eq)]
+struct NotParam;
+
+fn check<T: std::marker::ConstParamTy>() {}
+
+fn main() {
+ check::<[NotParam; 0]>();
+ //~^ error: `NotParam` can't be used as a const parameter type
+}