summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/generic_const_exprs/drop_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/const-generics/generic_const_exprs/drop_impl.rs')
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/drop_impl.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/generic_const_exprs/drop_impl.rs b/src/test/ui/const-generics/generic_const_exprs/drop_impl.rs
new file mode 100644
index 000000000..077f77aa0
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/drop_impl.rs
@@ -0,0 +1,16 @@
+//check-pass
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+struct Foo<const N: usize>
+where
+ [(); N + 1]: ;
+
+impl<const N: usize> Drop for Foo<N>
+where
+ [(); N + 1]: ,
+{
+ fn drop(&mut self) {}
+}
+
+fn main() {}