From 7205d6b5807daad417a9bd2fd2e907ac6f553e0d Mon Sep 17 00:00:00 2001 From: Anders Granlund Date: Thu, 7 Jan 2016 00:09:26 +0100 Subject: [PATCH] Fix error in example code --- src/librustc_typeck/check/regionck.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_typeck/check/regionck.rs b/src/librustc_typeck/check/regionck.rs index 759d561a961b7..801700ba673d5 100644 --- a/src/librustc_typeck/check/regionck.rs +++ b/src/librustc_typeck/check/regionck.rs @@ -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 //! }