]> git.proxmox.com Git - rustc.git/blobdiff - src/doc/rust-by-example/src/scope/lifetime/explicit.md
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / doc / rust-by-example / src / scope / lifetime / explicit.md
index ebd7b690174da05f716ece580814682ab2ad0b26..f0ecdf5fcab36df714e616e789a7697a6cd92eba 100644 (file)
@@ -40,7 +40,7 @@ fn failed_borrow<'a>() {
     let _x = 12;
 
     // ERROR: `_x` does not live long enough
-    //let y: &'a i32 = &_x;
+    let y: &'a i32 = &_x;
     // Attempting to use the lifetime `'a` as an explicit type annotation 
     // inside the function will fail because the lifetime of `&_x` is shorter
     // than that of `y`. A short lifetime cannot be coerced into a longer one.