-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Update Clippy #93865
Update Clippy #93865
Conversation
This commit changes the behavior of `single_match` lint. After that, we won't lint non-exhaustive matches like this: ```rust match Some(v) { Some(a) => println!("${:?}", a), None => {}, } ``` The rationale is that, because the type of `a` could be changed, so the user can get non-exhaustive match after applying the suggested lint (see rust-lang/rust-clippy#8282 (comment) for context). We also will lint `match` constructions with tuples. When we see the tuples on the both arms, we will check them both at the same time, and if they form exhaustive match, we could display the warning. Closes rust-lang#8282
Update docs for `map_flatten` on `Option` case closes rust-lang#8345 changelog: [`map_flatten`] Add docs info for `Option` case
Fix underflow in `manual_split_once` lint Hi, a friend found clippy started crashing on a suspiciously large allocation of `u64::MAX` memory on their code. The mostly minimized repro is: ```rust fn _f01(title: &str) -> Option<()> { let _ = title[1..].splitn(2, '[').next()?; Some(()) } ``` The underflow happens in this case on line 57 of the patch but I've changed the other substraction to saturating as well since it could potentially cause the same issue. I'm not sure where to put a regression test, or if it's even worth for such a thing. Aside, has it been considered before to build clippy with overflow checks enabled? changelog: fix ICE of underflow in `manual_split_once` lint
…steffen Add `default_union_representation` lint Closes rust-lang#8235 changelog: Added a new lint [`default_union_representation`]
This will prevent unstable order when HirIds are pertubated.
// Disable this rustc lint for now, as it was also done in rustc | ||
#![allow(rustc::potential_query_instability)] |
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.
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.
ah 🤔 clippy shouldn't care about it afaict, that's only an issue inside of rustcs query system
once the lint is part of the beta compiler i am going to actually start using it in rustc itself
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.
Yeah, that's also how I understood it, but wasn't 100% sure. I'll change this comment in the next sync. 👍
@bors r+ rollup=never p=1 |
📌 Commit 78ae132 has been approved by |
mingw-check would fail here, because I forgot a bootstrap attribute. While I checked locally if it is enough to add that, I found some more bootstrap issues. Fixed in 04c9842 This should now pass (at least it does so locally). If not, I won't be around until tomorrow to fix this. @bors r=Manishearth,flip1995 |
📌 Commit 04c9842 has been approved by |
⌛ Testing commit 04c9842 with merge 23f62bb6212f25e40c1d4f1060b1dfe17b444b9b... |
💔 Test failed - checks-actions |
@bors retry Could not resolve host: ci-mirrors.rust-lang.org |
@matthiaskrgr: 🔑 Insufficient privileges: not in try users |
@bors retry Could not resolve host: ci-mirrors.rust-lang.org |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e273fca): comparison url. Summary: This benchmark run did not return any relevant results. 1 results were found to be statistically significant but too small to be relevant. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
r? @Manishearth