-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Fix issue #8763 #10475
Fix issue #8763 #10475
Conversation
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// error-pattern: found module name used as a type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the "new" error pattern?
i.e. put //~ ERROR found module name used as a type
on the line where the error should occur, and remove this.
The error still isn't super great, but it does identify the thing it found as a module and print the name of said module. For the compile-fail/trait-impl-for-module.rs test: |
@alexcrichton @huonw is there anything else I need to fix here? |
I'm uncomfortable with how it's still a bad error message for other types. I would be more comfortable if an issue were opened with a relevant tests case along with a |
@alexcrichton You want a new issue in addition to #8767? |
Ah, looks like one already exists, can you tag the code with a FIXME? |
* added case & better error message for "impl trait for module" * used better way to print the module * switched from //error-pattern to //~ ERROR * added compile-fail test trait-impl-for-module.rs * revised compile-fail test trait-or-new-type-instead (the error message for the modified test is still unclear, but that's a different bug) * added FIXME to trait-or-new-type-instead
@alexcrichton Ok. FIXME added. :) |
Issue #8763 is about improving a particular error message. * added case & better error message for "impl trait for module" * added compile-fail test trait-impl-for-module.rs * updated copyright dates * revised compile-fail test trait-or-new-type-instead (the error message for the modified test is still unclear, but that's a different bug #8767)
Update changelog for beta-accepted labels Roses are red Violets are blue r? `@xFrednet` is better at this I can't rhyme. rust-lang/rust-clippy#10423 rust-lang/rust-clippy#10265 changelog: none
Issue #8763 is about improving a particular error message.
(the error message for the modified test is still unclear, but that's a different bug Bogus error when creating for an impl for a nonexistent type #8767)