Created
June 14, 2014 21:25
-
-
Save squiddy/9632f28d573e8593a4f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Foo<'a> { | |
a: Vec<String>, | |
b: Vec<Vec<&'a String>> | |
} | |
impl<'a> Foo<'a> { | |
fn bar(&mut self) { | |
let mut c = vec![]; | |
c.push(self.a.get(0)); | |
^~~~~~~~~~~~~~~~~ error: cannot infer an appropriate lifetime for autoref due to conflicting requirements | |
self.b.push(c); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment