Skip to content

Commit

Permalink
fix spelling on lexical lifetimes page
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Walladge committed Sep 21, 2018
1 parent 898e478 commit f61e1c1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![Minimum Rust version: beta](https://img.shields.io/badge/Minimum%20Rust%20Version-beta-orange.svg)

The borrow checker has been enhanced to accept more code, via a mechanism
called "non-lexial lifetimes." Consider this example:
called "non-lexical lifetimes." Consider this example:

```rust,ignore
fn main() {
Expand Down Expand Up @@ -64,7 +64,7 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
| - immutable borrow ends here
```

With non-lexial lifetime, the error changes slightly:
With non-lexical lifetimes, the error changes slightly:

```text
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
Expand All @@ -79,5 +79,5 @@ error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immuta
| - borrow later used here
```

instead of pointing to where `y` goes out of scope, it insteads shows you where
the conflicting borrow occurs. This makes these sorts of errors *far* easier to debug.
Instead of pointing to where `y` goes out of scope, it shows you where
the conflicting borrow occurs. This makes these sorts of errors *far* easier to debug.

0 comments on commit f61e1c1

Please sign in to comment.