We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8957a71 + 3dffa1e commit a658124Copy full SHA for a658124
src/scope/lifetime/explicit.md
@@ -40,10 +40,10 @@ fn failed_borrow<'a>() {
40
let _x = 12;
41
42
// ERROR: `_x` does not live long enough
43
- let y: &'a i32 = &_x;
+ let _y: &'a i32 = &_x;
44
// Attempting to use the lifetime `'a` as an explicit type annotation
45
// inside the function will fail because the lifetime of `&_x` is shorter
46
- // than that of `y`. A short lifetime cannot be coerced into a longer one.
+ // than that of `_y`. A short lifetime cannot be coerced into a longer one.
47
}
48
49
fn main() {
0 commit comments