Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest appropriate syntax on missing lifetime specifier in return type #55170

Closed
estebank opened this issue Oct 18, 2018 · 0 comments
Closed
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@estebank
Copy link
Contributor

Given the following code:

extern crate futures;

use futures::Future;
use std::error::Error;

fn foo() -> impl Future<Item=(), Error=Box<Error>> {
    Ok(())
}

Suggest the appropriate syntax to add the 'static lifetime bound (Box<Error + 'static>).

CC: https://www.reddit.com/r/rust/comments/9ozzic/expected_lifetime_parameter_with_future_utilizing/

@estebank estebank added the A-diagnostics Area: Messages for errors, warnings, and lints label Oct 18, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 23, 2018
Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

Fix rust-lang#55170.
kennytm added a commit to kennytm/rust that referenced this issue Oct 24, 2018
Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

Fix rust-lang#55170.
pietroalbini added a commit to pietroalbini/rust that referenced this issue Oct 25, 2018
Suggest appropriate syntax on missing lifetime specifier in return type

Suggest using `'static` when a lifetime is missing in the return type
with a structured suggestion instead of a note.

Fix rust-lang#55170.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints
Projects
None yet
Development

No branches or pull requests

1 participant