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

Comments

Projects
None yet
5 participants

@brson brson added P-high and removed I-nominated labels Sep 4, 2014

@huonw

This comment has been minimized.

Copy link
Member

huonw commented Sep 4, 2014

cc #16874

@eddyb

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

steveklabnik commented Dec 31, 2015

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

This comment has been minimized.

Copy link
Contributor

brson commented Aug 4, 2016

Close. Old and unloved.

@brson brson closed this Aug 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.