Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub struct FooStruct<'a> {
- pub bars: Vec<&'a str>,
- }
- pub trait FooTrait<'a> {
- fn getBars(&self) -> &'a Vec<&'a str>;
- }
- impl<'a> FooTrait<'a> for FooStruct<'a> {
- fn getBars(&self) -> &'a Vec<&'a str> {
- &self.bars // cannot infer an appropriate lifetime for borrow expression due to conflicting requirements
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement