diff options
Diffstat (limited to 'tests/ui/nll/issue-68550.rs')
-rw-r--r-- | tests/ui/nll/issue-68550.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/nll/issue-68550.rs b/tests/ui/nll/issue-68550.rs new file mode 100644 index 000000000..6bfd18de1 --- /dev/null +++ b/tests/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() {} |