summaryrefslogtreecommitdiffstats
path: root/tests/ui/statics/issue-44373.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/statics/issue-44373.rs')
-rw-r--r--tests/ui/statics/issue-44373.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/statics/issue-44373.rs b/tests/ui/statics/issue-44373.rs
new file mode 100644
index 000000000..0d011d096
--- /dev/null
+++ b/tests/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
+}