]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-30438-c.rs
Auto merge of #96605 - Urgau:string-retain-codegen, r=thomcc
[rust.git] / src / test / ui / issues / issue-30438-c.rs
index 813c1d3e2cccd9410c86a683bb6ec0b53533adbc..4cf634245be1b30cb7c693634dce3538dfe8a8b2 100644 (file)
@@ -5,6 +5,7 @@
 struct Test<'a> { s: &'a str }
 
 fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
+    //~^ WARN unnecessary lifetime parameter `'z`
     let x = Test { s: "this cannot last" };
     &x
     //~^ ERROR: cannot return reference to local variable `x`