aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3566-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/rust/compile/issue-3566-2.rs')
-rw-r--r--gcc/testsuite/rust/compile/issue-3566-2.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/rust/compile/issue-3566-2.rs b/gcc/testsuite/rust/compile/issue-3566-2.rs
new file mode 100644
index 0000000..3f3ea73
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3566-2.rs
@@ -0,0 +1,22 @@
+// run-pass
+
+#![allow(H8)]
+#![allow(dead_code)]
+
+
+// pretty-expanded FIXME #23616
+
+mod a {
+ pub mod b {
+ pub type t = isize;
+
+ pub fn f(x: [u8; { let s = 17; 100 }]) -> [u8; { let z = 18; 100 }] {
+ //~^ WARN unused variable: `s`
+ //~| WARN unused variable: `z`
+ x
+}
+ }
+}
+
+pub fn main() { //~ ERROR cannot move out
+ }