]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-30438-c.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-30438-c.rs
index 75caf0a75dfb6130231376ad20a8f7ec1ac3c796..813c1d3e2cccd9410c86a683bb6ec0b53533adbc 100644 (file)
@@ -7,7 +7,7 @@ struct Test<'a> { s: &'a str }
 fn silly<'y, 'z>(_s: &'y Test<'z>) -> &'y <Test<'z> as Trait>::Out where 'z: 'static {
     let x = Test { s: "this cannot last" };
     &x
-    //~^ ERROR: `x` does not live long enough
+    //~^ ERROR: cannot return reference to local variable `x`
 }
 
 impl<'b> Trait for Test<'b> { type Out = Test<'b>; }