-
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
Rollup of 9 pull requests #106266
Rollup of 9 pull requests #106266
Conversation
fix rust-lang#9993 changlog: [`match_wildcard_for_single_variants`] avoid suggestion on wildcard with guard
do explicit checks for the other branch being None
The related issue is rust-lang#9766 where the `manual_filter` lint would remove side effects
If the type of the result of a call to `IntoIterator::into_iter()` and the type of the receiver are the same, then the receiver implements `Iterator` and `into_iter()` is the identity function. The call to `into_iter()` may be removed in all but two cases: - If the receiver implements `Copy`, `into_iter()` will produce a copy of the receiver and cannot be removed. For example, `x.into_iter().next()` will not advance `x` while `x.next()` will. - If the receiver is an immutable local variable and the call to `into_iter()` appears in a larger expression, removing the call to `into_iter()` might cause mutability issues. For example, if `x` is an immutable local variable, `x.into_iter().next()` will compile while `x.next()` will not as `next()` receives `&mut self`.
… r=xFrednet Identify more cases of useless `into_iter()` calls changelog: Sugg: [`useless_conversion`]: Now suggests removing calls to `into_iter()` on an expression implementing `Iterator` [rust-lang#10020](rust-lang/rust-clippy#10020) <!-- changelog_checked -->
…dnet Move manual_clamp to nursery As discussed in rust-lang/rust-clippy#9484 (comment) and decided in the [Zulip meeting](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Meeting.202022-12-13/near/315626226) changelog: Moved [`manual_clamp`] to `nursery` (Now allow-by-default) [rust-lang#10101](rust-lang/rust-clippy#10101) <!-- changelog_checked -->
Null fn lints Adds lints to check for code, that assumes nullable `fn()`. ### Lint examples: `transmute_null_to_fn`: ```rust error: transmuting a known null pointer into a function pointer --> $DIR/transmute_null_to_fn.rs:9:23 | LL | let _: fn() = std::mem::transmute(std::ptr::null::<()>()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this transmute results in undefined behavior | = help: try wrapping your function pointer type in `Option<T>` instead, and using `None` as a null pointer value ``` `fn_null_check`: ```rust error: function pointer assumed to be nullable, even though it isn't --> $DIR/fn_null_check.rs:13:8 | LL | if (fn_ptr as *mut ()).is_null() {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try wrapping your function pointer type in `Option<T>` instead, and using `is_none` to check for null pointer value ``` Closes rust-lang#1644 --- changelog: Improvement: [`transmuting_null`]: Now detects `const` pointers to all types [rust-lang#10099](rust-lang/rust-clippy#10099) changelog: New lint: [`transmute_null_to_fn`] [rust-lang#10099](rust-lang/rust-clippy#10099) changelog: New lint: [`fn_null_check`] [rust-lang#10099](rust-lang/rust-clippy#10099) <!-- changelog_checked (This is just a flag for me, please don't add it manually) -->
Fix overflow ICE in large_stack/const_arrays Change `maximum_allowed_size` config variable type from `u64` to `u128`, and converting total array sizes to `u128` to avoid overflow during multiplication. Fixes rust-lang#10044 changelog: Fix: [`large_const_arrays`] and [`large_stack_arrays`]: avoid integer overflow when calculating total array size rust-lang#10103
Add 2018/2021 edition tests for wildcard_imports Fixes rust-lang#7943 --- changelog: none <!-- changelog_checked -->
…r=GuillaumeGomez rustdoc: simplify settings, help, and copy button CSS by not reusing Since there remains only one common CSS rule shared between them, there's no point to it: the block and selector costs more than the single `width` rule saves.
…, r=GuillaumeGomez docs/test: add docs and a UI test for `E0514` and `E0519` No UI test on `E0514`, it would need to compile with a different `rustc` version. r? `@GuillaumeGomez`
Update Clippy r? `@Manishearth` I think this was the very first sync with no conflicts whatsoever. I love this time of the year :D
…r=GuillaumeGomez Fix index out of bounds issues in rustdoc Fixes rust-lang#106213 r? `@matthiaskrgr`
…ter, r=jyn514 Formatter should not try to format non-Rust files Fixes rust-lang#106261
@bors r+ rollup=never p=9 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: e37ff7e71a In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (ad8ae05): comparison URL. Overall result: ❌ regressions - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
We're good here, this is noise.
While Hopefully it stabilizes (or the significance factor is updated to ignore it) soon enough, but there's nothing to worry about here. @rustbot label: +perf-regression-triaged |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - rust-lang#105899 (`./x doc library --open` opens `std`) - rust-lang#106190 (Account for multiple multiline spans with empty padding) - rust-lang#106202 (Trim more paths in obligation types) - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - rust-lang#106259 (Update Clippy) - rust-lang#106260 (Fix index out of bounds issues in rustdoc) - rust-lang#106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params) - rust-lang#105899 (`./x doc library --open` opens `std`) - rust-lang#106190 (Account for multiple multiline spans with empty padding) - rust-lang#106202 (Trim more paths in obligation types) - rust-lang#106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing) - rust-lang#106236 (docs/test: add docs and a UI test for `E0514` and `E0519`) - rust-lang#106259 (Update Clippy) - rust-lang#106260 (Fix index out of bounds issues in rustdoc) - rust-lang#106263 (Formatter should not try to format non-Rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Successful merges:
Fn
traits with lifetime params #104531 (Provide a better error and a suggestion forFn
traits with lifetime params)./x doc library --open
opensstd
#105899 (./x doc library --open
opensstd
)E0514
andE0519
#106236 (docs/test: add docs and a UI test forE0514
andE0519
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup