]> 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 2b4d0dc339bf0da0b4ada1f5a5dcdadb084bc40e..813c1d3e2cccd9410c86a683bb6ec0b53533adbc 100644 (file)
@@ -1,13 +1,3 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
 // Simplified regression test for #30438, inspired by arielb1.
 
 trait Trait { type Out; }
@@ -17,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>; }