about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEllen <supbscripter@gmail.com>2021-08-04 18:30:41 +0100
committerEllen <supbscripter@gmail.com>2021-08-04 18:30:54 +0100
commitb1d14ef08fefa81a8f4b459fbfb11dafe9005d0a (patch)
tree94091363cdb6cfdadbef2d559651a35d6755a7b8 /src
parent7f3dc0464422ebadf3b8647f591bcf6e3107e805 (diff)
downloadrust-b1d14ef08fefa81a8f4b459fbfb11dafe9005d0a.tar.gz
rust-b1d14ef08fefa81a8f4b459fbfb11dafe9005d0a.zip
dropck
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/const-generics/const_evaluatable_checked/drop_impl.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/const_evaluatable_checked/drop_impl.rs b/src/test/ui/const-generics/const_evaluatable_checked/drop_impl.rs
new file mode 100644
index 00000000000..41fb5d70afd
--- /dev/null
+++ b/src/test/ui/const-generics/const_evaluatable_checked/drop_impl.rs
@@ -0,0 +1,16 @@
+//check-pass
+#![feature(const_generics, const_evaluatable_checked)]
+#![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() {}