Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cargo b -q
- error: cannot infer an appropriate lifetime
- --> src/lib.rs:381:14
- |
- 380 | pub fn dynamic_entries(&self, tag: DynamicTag) -> impl Iterator<Item = Addr> {
- | -------------------------- this return type evaluates to the `'static` lifetime...
- 381 | self.dynamic_table()
- | ---- ^^^^^^^^^^^^^
- | |
- | ...but this borrow...
- |
- note: ...can't outlive the anonymous lifetime #1 defined on the method body at 380:5
- --> src/lib.rs:380:5
- |
- 380 | / pub fn dynamic_entries(&self, tag: DynamicTag) -> impl Iterator<Item = Addr> {
- 381 | | self.dynamic_table()
- 382 | | .unwrap_or_default()
- 383 | | .iter()
- 384 | | .filter(|e| e.tag == tag)
- 385 | | .map(|e| e.addr)
- 386 | | }
- | |_____^
- help: you can add a constraint to the return type to make it last less than `'static` and match the anonymous lifetime #1 defined on the method body at 380:5
- |
- 380 | pub fn dynamic_entries(&self, tag: DynamicTag) -> impl Iterator<Item = Addr> + '_ {
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement