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

Where clauses that do not involve parameter types should be rejected #20019

Closed
nikomatsakis opened this issue Dec 19, 2014 · 1 comment · Fixed by #20623
Closed

Where clauses that do not involve parameter types should be rejected #20019

nikomatsakis opened this issue Dec 19, 2014 · 1 comment · Fixed by #20623

Comments

@nikomatsakis
Copy link
Contributor

RFC 135 specifies that where clauses that involve no generic parameters, such as where int : Eq, are illegal. We should add a test that checks that a suitable error is reported. Note that the type parameter may appear outside the self type, however, so something like where int : Foo<Option<X>> should be fine.

@jroesch
Copy link
Member

jroesch commented Dec 19, 2014

As a note a test like this should fail once we make the change: https://github.com/jroesch/rust/blob/generalized-where-clause-parser/src/test/run-pass/where-clauses-not-parameter.rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants