diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/self/issue-61882-2.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/self/issue-61882-2.rs b/src/test/ui/self/issue-61882-2.rs new file mode 100644 index 000000000..1209b54bc --- /dev/null +++ b/src/test/ui/self/issue-61882-2.rs @@ -0,0 +1,11 @@ +struct A<T>(T); + +impl A<&'static u8> { + fn f() { + let x = 0; + Self(&x); + //~^ ERROR `x` does not live long enough + } +} + +fn main() {} |