rust/tests/ui/self/issue-61882-2.rs

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

12 lines
160 B
Rust
Raw Normal View History

struct A<T>(T);
impl A<&'static u8> {
fn f() {
let x = 0;
Self(&x);
//~^ ERROR `x` does not live long enough
}
}
fn main() {}