summaryrefslogtreecommitdiffstats
path: root/src/test/ui/statics/issue-44373.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/statics/issue-44373.rs')
-rw-r--r--src/test/ui/statics/issue-44373.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/ui/statics/issue-44373.rs b/src/test/ui/statics/issue-44373.rs
new file mode 100644
index 000000000..0d011d096
--- /dev/null
+++ b/src/test/ui/statics/issue-44373.rs
@@ -0,0 +1,5 @@
+static FOO: u32 = 50;
+
+fn main() {
+ let _val: &'static [&'static u32] = &[&FOO]; //~ ERROR temporary value dropped while borrowed
+}