-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 9 pull requests #91602
Closed
Closed
Rollup of 9 pull requests #91602
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Server 2022 is a different version from Win11, breaking precent
…, r=flip1995 Reference `clippy_utils` docs on nightly-rustc and some other documentation updates The `clippy_utils` crate is now part of the nightly-rustc documentation. See [**very beautiful documentation**](https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/). This PR references them in our documentation and updates some other documentation. changelog: none
Fix false negative in [`match_overlapping_arms`] changelog: Fix false negative in [`match_overlapping_arms`]
Replace `in_macro` usage with `from_expansion` changelog: none Generally replace `in_macro(span)` with `span.from_expansion()`. If we're just trying to avoid expanded code, this seems more appropriate because any kind of expanded code is prone to false positives. One place I did not touch is `macro_use.rs`. I think this lint could use a rewrite so I moved `in_macro` there, the only place it is still used.
…shearth Remove rustfmt::skip attribute from register_plugins function r? `@Manishearth` since you added this in rust-lang#540 😄 changelog: none
I found the manual run command really useful, this makes it a bit easier to type
…effen Extend author lint changelog: none * Print float and int suffixes * Print labels * Struct field checks * Repeat length expression check * Destructure method calls * Destructure closures
Add `cargo dev lint` to manually run clippy on a file I found the manual run command really useful, this makes it a bit easier to type Not sure if this belongs in the changelog or not changelog: Add `cargo dev lint` to manually run clippy on a file
TraitKind -> Trait TyAliasKind -> TyAlias ImplKind -> Impl FnKind -> Fn All `*Kind`s in AST are supposed to be enums. Tuple structs are converted to braced structs for the types above, and fields are reordered in syntactic order. Also, mutable AST visitor now correctly visit spans in defaultness, unsafety, impl polarity and constness.
The only reason to use `abort_if_errors` is when the program is so broken that either: 1. later passes get confused and ICE 2. any diagnostics from later passes would be noise This is never the case for lints, because the compiler has to be able to deal with `allow`-ed lints. So it can continue to lint and compile even if there are lint errors.
Fix ICE in undocumented_unsafe_blocks changelog: Fix ICE in [`undocumented_unsafe_blocks`] closes: rust-lang#7934
Introduce `expr_visitor` and `expr_visitor_no_bodies` changelog: none A couple utils that satisfy a *lot* of visitor use cases. Factoring in every possible usage would be really big so I just focused on cleaning clippy_utils.
…r=llogiq Enable rustbot shortcuts for rust-clippy This enables shortcuts for ``@rustbot`.` Just a quality of life feature for contributors. |Shortcut| Full comment | |---|---| | ``@rustbot` ready` | ``@rustbot` label -S-waiting-on-author +S-waiting-on-review` | | ``@rustbot` author` | ``@rustbot` label +S-waiting-on-author -S-waiting-on-review` | See: https://github.com/rust-lang/triagebot/wiki/Shortcuts The documentation also states that the author/assignee will be pinged. However, this doesn't seem to be the case, it at least hasn't done so for me and in this [PR](rust-lang#90642 (comment)) --- changelog: none
…negatives, r=camsteffen Fix some false negatives for [`single_char_pattern`] *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: Fix some false negatives for [`single_char_pattern`] I noticed that clippy wasn't complaining about my usage of `split_once("x")` in a personal project so I updated the list of functions. I had to update the test case for an unrelated issue because replace is now included in the list of functions to be linted.
Add test Apply suggestions Switch to match Apply cargofmt
Update std::env::temp_dir to use GetTempPath2 on Windows when available. As a security measure, Windows 11 introduces a new temporary directory API, GetTempPath2. When the calling process is running as SYSTEM, a separate temporary directory will be returned inaccessible to non-SYSTEM processes. For non-SYSTEM processes the behavior will be the same as before. This can help mitigate against attacks such as this one: https://medium.com/csis-techblog/cve-2020-1088-yet-another-arbitrary-delete-eop-a00b97d8c3e2 Compatibility risk: Software which relies on temporary files to communicate between SYSTEM and non-SYSTEM processes may be affected by this change. In many cases, such patterns may be vulnerable to the very attacks the new API was introduced to harden against. I'm unclear on the Rust project's tolerance for such change-of-behavior in the standard library. If anything, this PR is meant to raise awareness of the issue and hopefully start the conversation. How tested: Taking the example code from the documentation and running it through psexec (from SysInternals) on Win10 and Win11. On Win10: C:\test>psexec -s C:\test\main.exe <...> Temporary directory: C:\WINDOWS\TEMP\ On Win11: C:\test>psexec -s C:\test\main.exe <...> Temporary directory: C:\Windows\SystemTemp\
Add test for evaluate_obligation: Ok(EvaluatedToOkModuloRegions) ICE Adds the minimial repro test case from rust-lang#85360. The fix for rust-lang#85360 was supposed to be rust-lang#85868 however the repro was resolved in the 2021-07-05 nightly while rust-lang#85868 didn't land until 2021-09-03. The reason for that is d34a3a4 **also** resolves that issue. To test if rust-lang#85868 actually fixes rust-lang#85360, I reverted d34a3a4 and found that rust-lang#85868 does indeed resolve rust-lang#85360. With that question resolved, add a test case to our incremental test suite for the original Ok(EvaluatedToOkModuloRegions) ICE. Thanks to ``@lqd`` for helping track this down!
…, r=wesleywiser Print a suggestion when comparing references to primitive types in `const fn` Fixes rust-lang#90870.
…kh726 Fix AnonConst ICE I am not sure if this is even the correct place to fix this issue, but i went down the path where the generic args came from and i wasn't able to find a clear cause for this down there. But if anybody has a suggestion what i should do, just tell me. This fixes: rust-lang#91267
Remove a dead code path. It is neither documented nor can I see any way it could ever be reached. Also, no tests fail when turning that arm into an ICE
…rister Tweak "call this function" suggestion to have smaller span
…scottmcm Suggest try_reserve in try_reserve_exact During developing rust-lang#91529 , I found that `try_reserve_exact` suggests `reserve` for further insertions. I think it's a mistake by copy&paste, `try_reserve` is better here.
Update Clippy Since RLS is now already broken rust-lang#91543 , we shouldn't be blocked by it anymore. I plan to do the RLS update once new rustc-ap packages are released. r? `@Manishearth`
update Miri Fixes rust-lang#91542 r? `@ghost`
@bors r+ rollup=never p=9 |
📌 Commit 9c57fd7 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Dec 6, 2021
@bors retry |
⌛ Testing commit 9c57fd7 with merge 9a46c3a21ebbd02e7c210ea8349215a80387d3fd... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Dec 6, 2021
No idea what caused this :/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
const fn
#91272 (Print a suggestion when comparing references to primitive types inconst fn
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup