Skip to content

Instantly share code, notes, and snippets.

@narodnik
Created July 5, 2020 10:35
Show Gist options
  • Save narodnik/6e4f94772d599de65c5166489b0d9afb to your computer and use it in GitHub Desktop.
Save narodnik/6e4f94772d599de65c5166489b0d9afb to your computer and use it in GitHub Desktop.
error: cannot infer an appropriate lifetime
--> examples/client.rs:84:20
|
84 | async fn start(&self) -> io::Result<()> {
| ^^^^^ ...but this borrow...
...
90 | let _ = smol::Task::spawn(self.wait_shutdown_signal(stopped.clone()));
| ----------------- this return type evaluates to the `'static` lifetime...
|
note: ...can't outlive the lifetime `'_` as defined on the method body at 84:20
--> examples/client.rs:84:20
|
84 | async fn start(&self) -> io::Result<()> {
| ^
error: aborting due to previous error; 1 warning emitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment