Fix error in example code
This commit is contained in:
parent
5daa75373d
commit
7205d6b580
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@
|
|||
//!
|
||||
//! struct Foo { i: i32 }
|
||||
//! struct Bar { foo: Foo }
|
||||
//! fn get_i(x: &'a Bar) -> &'a i32 {
|
||||
//! fn get_i<'a>(x: &'a Bar) -> &'a i32 {
|
||||
//! let foo = &x.foo; // Lifetime L1
|
||||
//! &foo.i // Lifetime L2
|
||||
//! }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue