File tree 1 file changed +4
-4
lines changed
src/rust-2018/ownership-and-lifetimes
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 3
3
![ Minimum Rust version: beta] ( https://img.shields.io/badge/Minimum%20Rust%20Version-beta-orange.svg )
4
4
5
5
The borrow checker has been enhanced to accept more code, via a mechanism
6
- called "non-lexial lifetimes." Consider this example:
6
+ called "non-lexical lifetimes." Consider this example:
7
7
8
8
``` rust,ignore
9
9
fn main() {
@@ -64,7 +64,7 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
64
64
| - immutable borrow ends here
65
65
```
66
66
67
- With non-lexial lifetime , the error changes slightly:
67
+ With non-lexical lifetimes , the error changes slightly:
68
68
69
69
``` text
70
70
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
@@ -79,5 +79,5 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
79
79
| - borrow later used here
80
80
```
81
81
82
- instead of pointing to where ` y ` goes out of scope, it insteads shows you where
83
- the conflicting borrow occurs. This makes these sorts of errors * far* easier to debug.
82
+ Instead of pointing to where ` y ` goes out of scope, it shows you where
83
+ the conflicting borrow occurs. This makes these sorts of errors * far* easier to debug.
You can’t perform that action at this time.
0 commit comments