rust/tests/ui/nll/issue-68550.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
315 B
Rust
Raw Normal View History

2020-04-09 10:55:27 +00:00
// 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() {}