-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Warn on unused_attributes in uitests #147813
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
Conversation
Some changes occurred in src/tools/compiletest cc @jieyouxu |
|
//~^ ERROR documentation comments cannot be applied to function | ||
#[must_use] | ||
//~^ ERROR allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters | ||
//~| WARN attribute cannot be used on |
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.
Found another duplicate warning, added to #147417, will fix in another PR
r=me after you corrected that comment :) |
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
@jdonszelmann This PR does not introduce the bug, it merely finds it. I think it's better to fix it in a separate PR, since the fix is sadly not trivial |
No I mean the unfinished comment, @rustbot author |
f205729
to
8d68bd7
Compare
Ah I see, I missed that oops :P |
💡 This pull request was already approved, no need to approve it again.
|
Rollup of 6 pull requests Successful merges: - #146509 (Result/Option layout guarantee clarifications) - #147494 (std::thread spawn: Docs: Link to Builder::spawn; Make same.) - #147532 ( Port `#[cfg_attr]` to the new attribute parsing infrastructure) - #147783 (bootstrap: migrate to object 0.37) - #147792 (Fix autodiff incorrectly applying fat-lto to proc-macro crates ) - #147809 (rustdoc: Fix passes order so intra-doc links are collected after stripping passes) Failed merges: - #147813 (Warn on unused_attributes in uitests ) r? `@ghost` `@rustbot` modify labels: rollup
Signed-off-by: Jonathan Brouwer <[email protected]>
Signed-off-by: Jonathan Brouwer <[email protected]>
8d68bd7
to
66b8a9d
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@bors r=@jdonszelmann |
… r=jdonszelmann Warn on unused_attributes in uitests r? `@jdonszelmann` Because: - unused_attributes warnings are usually actual mistakes, rather than just unused code, and we want to notify test writers they may be accidentally making a mistake - Because the lint was allowed by default previously, we missed real bugs, because the test coverage is worse 1. rust-lang#147417 2. rust-lang#147411
Rollup of 8 pull requests Successful merges: - #138679 (Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop) - #146167 (Deny-by-default never type lints) - #146490 (Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2]) - #147438 (Rename "non-inline module" to "file module" in proc macro diagnostics) - #147724 (Fix ICE in pattern matching with generic const array length errors) - #147813 (Warn on unused_attributes in uitests ) - #147816 (Do not error out for `download-rustc` if LTO is configured) - #147845 (Add regression test for 134355) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - #138679 (Issue-125323: ICE non-ADT in struct pattern when long time constant evaluation is in for loop) - #146490 (Rehome 26 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` [#5 of Batch #2]) - #147438 (Rename "non-inline module" to "file module" in proc macro diagnostics) - #147724 (Fix ICE in pattern matching with generic const array length errors) - #147813 (Warn on unused_attributes in uitests ) - #147816 (Do not error out for `download-rustc` if LTO is configured) - #147845 (Add regression test for 134355) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147813 - JonathanBrouwer:unused_attributes, r=jdonszelmann Warn on unused_attributes in uitests r? ```@jdonszelmann``` Because: - unused_attributes warnings are usually actual mistakes, rather than just unused code, and we want to notify test writers they may be accidentally making a mistake - Because the lint was allowed by default previously, we missed real bugs, because the test coverage is worse 1. #147417 2. #147411
r? @jdonszelmann
Because:
#[link_section = ".mysection"]
to a function in an impl is now a warning with potential error in the future? #147411