summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/drop-maybe_uninit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/drop-maybe_uninit.rs')
-rw-r--r--tests/ui/consts/drop-maybe_uninit.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/consts/drop-maybe_uninit.rs b/tests/ui/consts/drop-maybe_uninit.rs
new file mode 100644
index 000000000..2fdeae5f1
--- /dev/null
+++ b/tests/ui/consts/drop-maybe_uninit.rs
@@ -0,0 +1,17 @@
+// build-pass
+
+pub const fn f<T, const N: usize>(_: [std::mem::MaybeUninit<T>; N]) {}
+
+pub struct Blubb<T>(*const T);
+
+pub const fn g<T, const N: usize>(_: [Blubb<T>; N]) {}
+
+pub struct Blorb<const N: usize>([String; N]);
+
+pub const fn h(_: Blorb<0>) {}
+
+pub struct Wrap(Blorb<0>);
+
+pub const fn i(_: Wrap) {}
+
+fn main() {}