Skip to content

Test fail in srml/staking #79

@hackfisher

Description

@hackfisher
error: cannot infer an appropriate lifetime
  --> /Users/denny/.cargo/registry/src/github.com-1ecc6299db9ec823/soketto-0.2.2/src/handshake.rs:95:25
   |
94 |     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
   |                                           ----------------------------------------------- this return type evaluates to the `'static` lifetime...
95 |         self.extensions.drain()
   |         --------------- ^^^^^
   |         |
   |         ...but this borrow...
   |
note: ...can't outlive the anonymous lifetime #1 defined on the method body at 94:5
  --> /Users/denny/.cargo/registry/src/github.com-1ecc6299db9ec823/soketto-0.2.2/src/handshake.rs:94:5
   |
94 | /     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
95 | |         self.extensions.drain()
96 | |     }
   | |_____^
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 94:5
   |
94 |     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_ {
   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: cannot infer an appropriate lifetime
   --> /Users/denny/.cargo/registry/src/github.com-1ecc6299db9ec823/soketto-0.2.2/src/handshake.rs:284:25
    |
283 |     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
    |                                           ----------------------------------------------- this return type evaluates to the `'static` lifetime...
284 |         self.extensions.drain()
    |         --------------- ^^^^^
    |         |
    |         ...but this borrow...
    |
note: ...can't outlive the anonymous lifetime #1 defined on the method body at 283:5
   --> /Users/denny/.cargo/registry/src/github.com-1ecc6299db9ec823/soketto-0.2.2/src/handshake.rs:283:5
    |
283 | /     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
284 | |         self.extensions.drain()
285 | |     }
    | |_____^
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 283:5
    |
283 |     pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_ {
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

error: could not compile `soketto`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions