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

"Explicit lifetime bound required" message should give suggestions #16948

Closed
nikomatsakis opened this issue Sep 2, 2014 · 4 comments
Closed
Labels
P-medium Medium priority

Comments

@nikomatsakis
Copy link
Contributor

See comments on discuss:

Nominating for P-high, not 1.0.

@huonw
Copy link
Member

huonw commented Sep 4, 2014

cc #16874

@eddyb
Copy link
Member

eddyb commented Dec 27, 2014

"trait object requires explicit lifetime bound" would be less confusing (when it occurs on a trait) - I've seen many cases where a trait was accidentally used instead of a regular type and there was no obvious hint as to why a lifetime bound would be required at all.

@steveklabnik
Copy link
Member

It seems that the span for one of these errors has gotten better:

       "the lifetime bound for this object type cannot be deduced \
                           from context; please supply an explicit bound");

The Discuss thread is difficult because there aren't a lot of contained examples, and we don't have an extended error explanation for this message, nor any tests that I can find?

$ git grep "explicit lifetime bound required"
src/librustc_typeck/astconv.rs:                  "ambiguous lifetime bound, explicit lifetime bound required");
src/librustc_typeck/diagnostics.rs:    E0227, // ambiguous lifetime bound, explicit lifetime bound required
src/librustc_typeck/diagnostics.rs:    E0228, // explicit lifetime bound required

@brson
Copy link
Contributor

brson commented Aug 4, 2016

Close. Old and unloved.

@brson brson closed this as completed Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

5 participants