summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/issue-68550.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/issue-68550.rs')
-rw-r--r--src/test/ui/nll/issue-68550.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/nll/issue-68550.rs b/src/test/ui/nll/issue-68550.rs
new file mode 100644
index 000000000..6bfd18de1
--- /dev/null
+++ b/src/test/ui/nll/issue-68550.rs
@@ -0,0 +1,15 @@
+// Regression test for issue #68550.
+//
+// The `&'static A:` where clause was triggering
+// ICEs because it wound up being compiled to reference
+// the `'empty(U0)` region.
+
+fn run<'a, A>(x: A)
+where
+ A: 'static,
+ &'static A: ,
+{
+ let _: &'a A = &x; //~ ERROR `x` does not live long enough
+}
+
+fn main() {}