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

E0122 "trait bounds are not (yet) enforced in type definitions" not triggered by where clauses #39122

Closed
insaneinside opened this issue Jan 17, 2017 · 2 comments
Labels
A-typesystem Area: The type system E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@insaneinside
Copy link
Contributor

insaneinside commented Jan 17, 2017

As this playpen shows, diagnostic E0122 does not catch trait bounds introduced via where clauses.

Specifically,

type X<T: std::ops::Add> = T;

triggers a warning, but

type Y<T> where T: std::ops::Add = T;

does not.

@brson brson added I-nominated T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 18, 2017
@brson
Copy link
Contributor

brson commented Jan 18, 2017

Looks like something that should be locked down.

@brson brson added E-help-wanted Call for participation: Help is requested to fix this issue. A-typesystem Area: The type system labels Jan 18, 2017
@circuitfox
Copy link
Contributor

I think I'll take a shot at this.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Jan 19, 2017
…nds-where-clause, r=arielb1

E0122 should apply with where clauses

Fixes rust-lang#39122
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants