Skip to content

Commit

Permalink
Merge pull request #1191 from russelldavis/elision
Browse files Browse the repository at this point in the history
Fix usage of the word "elision"
  • Loading branch information
marioidival committed May 24, 2019
2 parents 48661b7 + ce6c834 commit 8fb9313
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scope/lifetime/elision.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Elision

Some lifetime patterns are overwhelmingly common and so the borrow checker
will implicitly add them to save typing and to improve readability.
This process of implicit addition is called elision. Elision exists in Rust
solely because these patterns are common.
will allow you to omit them to save typing and to improve readability.
This is known as elision. Elision exists in Rust solely because these patterns
are common.

The following code shows a few examples of elision. For a more comprehensive
description of elision, see [lifetime elision][elision] in the book.

```rust,editable
// `elided_input` and `annotated_input` essentially have identical signatures
// because the lifetime of `elided_input` is elided by the compiler:
// because the lifetime of `elided_input` is inferred by the compiler:
fn elided_input(x: &i32) {
println!("`elided_input`: {}", x);
}
Expand Down

0 comments on commit 8fb9313

Please sign in to comment.