From a0ed0f30baf833408069293634b80840e389eefa Mon Sep 17 00:00:00 2001 From: Tyler Thrailkill Date: Sun, 25 Jan 2015 01:24:41 -0700 Subject: [PATCH] Add example for Lifetime Elision with two inputs Lifetime elision with two input references is not clear. Closes #21284 --- src/doc/trpl/ownership.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/trpl/ownership.md b/src/doc/trpl/ownership.md index 56cb5b1de699..9e3a3f12d1d2 100644 --- a/src/doc/trpl/ownership.md +++ b/src/doc/trpl/ownership.md @@ -533,6 +533,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded fn get_str() -> &str; // ILLEGAL, no inputs fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs +fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear fn get_mut(&mut self) -> &mut T; // elided fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded