]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-17718-constants-not-static.rs
Rollup merge of #62337 - Mark-Simulacrum:fix-cpu-usage-script, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-17718-constants-not-static.rs
index 9b7ed463499ded297d51d51eafe702561a5321d5..2e6aff1618bfbc62d53b0f04210ea96920c53bff 100644 (file)
@@ -1,19 +1,9 @@
-// Copyright 2014 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.
-
 fn id<T>(x: T) -> T { x }
 
 const FOO: usize = 3;
 
 fn foo() -> &'static usize { &id(FOO) }
-//~^ ERROR: borrowed value does not live long enough
+//~^ ERROR: cannot return reference to temporary value
 
 fn main() {
 }