-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 items_after_test_module
: Ignore imported modules
#10719
Fix items_after_test_module
: Ignore imported modules
#10719
Conversation
r? @Alexendoo (rustbot has picked a reviewer for you, use r? to override) |
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.
You can create a test in ui-cargo
rather than ui
for this, that way the module isn't being itself compiled as a test
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.
That or put the module in auxiliary
and import it with #[path = "auxiliary/tests.rs"] mod tests;
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.
Fixed
fn should_lint() {} | ||
|
||
const SHOULD_ALSO_LINT: usize = 1; |
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.
These could do with a rename
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.
Empty stderrs can be removed
Thanks! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #10713. It does a little bit of dark magic, but intention is what really counts.
changelog:[
items_after_test_module
]: Ignore imported modules (mod foo;
) with no body.