File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Elision
2
2
3
3
Some lifetime patterns are overwhelmingly common and so the borrow checker
4
- will implicitly add them to save typing and to improve readability.
5
- This process of implicit addition is called elision. Elision exists in Rust
6
- solely because these patterns are common.
4
+ will allow you to omit them to save typing and to improve readability.
5
+ This is known as elision. Elision exists in Rust solely because these patterns
6
+ are common.
7
7
8
8
The following code shows a few examples of elision. For a more comprehensive
9
9
description of elision, see [ lifetime elision] [ elision ] in the book.
10
10
11
11
``` rust,editable
12
12
// `elided_input` and `annotated_input` essentially have identical signatures
13
- // because the lifetime of `elided_input` is elided by the compiler:
13
+ // because the lifetime of `elided_input` is inferred by the compiler:
14
14
fn elided_input(x: &i32) {
15
15
println!("`elided_input`: {}", x);
16
16
}
You can’t perform that action at this time.
0 commit comments