about summary refs log tree commit diff
path: root/tests/ui/consts/self_normalization.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/self_normalization.rs')
-rw-r--r--tests/ui/consts/self_normalization.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/consts/self_normalization.rs b/tests/ui/consts/self_normalization.rs
new file mode 100644
index 00000000000..b2a34f5877b
--- /dev/null
+++ b/tests/ui/consts/self_normalization.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+fn testfn(_arr: &mut [(); 0]) {}
+
+trait TestTrait {
+    fn method();
+}
+
+impl TestTrait for [(); 0] {
+    fn method() {
+        let mut arr: Self = [(); 0];
+        testfn(&mut arr);
+    }
+}
+
+fn main() {}