Skip to content

Commit e39808c

Browse files
committed
Link to 'Lifetime Elision' section at first use of elide
1 parent 915cf01 commit e39808c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/trpl/lifetimes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,11 @@ fn bar<'a>(x: &'a i32) {
7070
```
7171

7272
The `'a` reads ‘the lifetime a’. Technically, every reference has some lifetime
73-
associated with it, but the compiler lets you omit them in common cases.
73+
associated with it, but the compiler lets you elide (i.e. omit, see ["Lifetime Elision"][lifetime-elision] below) them in common cases.
7474
Before we get to that, though, let’s break the explicit example down:
7575

76+
[lifetime-elision]: #user-content-lifetime-elision
77+
7678
```rust,ignore
7779
fn bar<'a>(...)
7880
```

0 commit comments

Comments
 (0)