]> git.proxmox.com Git - rustc.git/blobdiff - src/test/compile-fail/range-2.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / compile-fail / range-2.rs
index c9053328572bcc3b07800255081d6f94ceabcb73..94967693ecf912d65d9c9db1b00b83bf83202d4c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// 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.
 //
 
 pub fn main() {
     let r = {
-        &42..&42
-        //~^ ERROR borrowed value does not live long enough
-        //~^^ ERROR borrowed value does not live long enough
+        let a = 42;
+        let b = 42;
+        &a..&b
+        //~^ ERROR `a` does not live long enough
+        //~^^ ERROR `b` does not live long enough
     };
 }