summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-67862.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/consts/issue-67862.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/consts/issue-67862.rs b/src/test/ui/consts/issue-67862.rs
new file mode 100644
index 000000000..b9e96a87f
--- /dev/null
+++ b/src/test/ui/consts/issue-67862.rs
@@ -0,0 +1,18 @@
+// compile-flags: -Z mir-opt-level=3
+// run-pass
+
+fn e220() -> (i64, i64) {
+ #[inline(never)]
+ fn get_displacement() -> [i64; 2] {
+ [139776, 963904]
+ }
+
+ let res = get_displacement();
+ match (&res[0], &res[1]) {
+ (arg0, arg1) => (*arg0, *arg1),
+ }
+}
+
+fn main() {
+ assert_eq!(e220(), (139776, 963904));
+}