-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Clippy subtree update #145749
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
Clippy subtree update #145749
Conversation
This is necessary in order to use type analysis in later commits.
Suggesting to remove `*&` or `*&mut` in a macro may be incorrect, as it would require tracking all possible macro usages. In some cases, it is not possible to remove the dereference or the reference. For example, in the following code, the `drmut!()` macro will be linted against while called as `drmut!(d)`, and the suggestion would be to remove the `*&mut`. That would make `drmut!(u.data).num = 1` invalid, as a `ManuallyDrop` object coming through a union cannot be implicitely dereferenced through `DerefMut`. ```rust use std::mem::ManuallyDrop; #[derive(Copy, Clone)] struct Data { num: u64, } union Union { data: ManuallyDrop<Data>, } macro_rules! drmut { ($e:expr) => { *&mut $e }; } fn f(mut u: Union, mut d: Data) { unsafe { drmut!(u.data).num = 1; } drmut!(d).num = 1; } ```
changelog: none Signed-off-by: Zihan <[email protected]>
A type with escaping bound vars cannot be wrapped in a dummy binder during size computation.
Minor optimization to avoid deallocating/reallocating a new `Vec` in the top `check_doc` loop. changelog: none r? blyxyas
makes the suggestion a bit more legible
…-lang#15436) fixes rust-lang/rust-clippy#8817 changelog: [`eta_reduction`]: don't refer to ADT constructors as "function"s
…-lang#15403) changelog: [`crosspointer_transmute`]: move from `complexity` to `suspicious` this looks to me like an obvious miscategorisation -- and there was already [a proposal to move the lint](rust-lang/rust-clippy#6626 (comment))
This is a small thing I noticed while looking into rust-lang/rust-clippy#8014. Since I ultimately decided not to change the code as a response to the issue, I'm now left with this one commit, and I feel a bit unsure about making a PR just for that. This is a problem I have relatively often, so I'd like to know whether I should to batch these small changes somehow, or whether these small PRs are fine after all changelog: none
allows removing the `#[allow(clippy::too_many_lines)]`
Letting rustbot assign a reviewer, so that someone can double check 9de86f4. changelog: none
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
|
@bors r+ |
@bors p=1 rollup=never |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing f5703d5 (parent) -> d20509c (this PR) Test differencesShow 4 test diffs4 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard d20509c2a0c71b60aa2b51566e4d14920e8a1661 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (d20509c): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -5.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 466.339s -> 468.202s (0.40%) |
@flip1995 @Manishearth I think the profile changes in clippy's Cargo.toml are impacting the root Cargo.toml, and emitting warnings when cargo is invoked in the repo, e.g. by bootstrap:
These can also be seen in the CI logs, and in our beautiful log viewer. |
Remove profile section from Clippy To avoid workspace warnings. [This](rust-lang#145749) subtree sync started causing warnings in Rust builds (rust-lang#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: rust-lang#145777
Remove profile section from Clippy To avoid workspace warnings. [This](rust-lang#145749) subtree sync started causing warnings in Rust builds (rust-lang#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: rust-lang#145777
Remove profile section from Clippy To avoid workspace warnings. [This](rust-lang#145749) subtree sync started causing warnings in Rust builds (rust-lang#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: rust-lang#145777
Rollup merge of #145781 - Kobzol:clippy-remove-profile, r=lqd Remove profile section from Clippy To avoid workspace warnings. [This](#145749) subtree sync started causing warnings in Rust builds (#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: #145777
Remove profile section from Clippy To avoid workspace warnings. [This](rust-lang/rust#145749) subtree sync started causing warnings in Rust builds (rust-lang/rust#145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in rust-lang/rust-clippy#13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](rust-lang/rust-clippy@90364dd), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: rust-lang/rust#145777
r? @Manishearth