mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #12065 - loongarch-rs:fix-unused-mut, r=weihanglo
Fix warning with unused mut ### What does this PR try to resolve? ``` warning: variable does not need to be mutable --> src/cargo/core/compiler/unit_dependencies.rs:152:5 | 152 | mut state: &mut State<'_, '_>, | ----^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default warning: `cargo` (lib) generated 1 warning (run `cargo fix --lib -p cargo` to apply 1 suggestion) ``` This is caused by https://github.com/rust-lang/rust/pull/110960 ### How should we test and review this PR? Running the mainline rust toolchain and `cargo build` without any wanrning messages would look like the above. ### Additional information None
This commit is contained in:
commit
ee7f4c3b3d
@ -149,7 +149,7 @@ pub fn build_unit_dependencies<'a, 'cfg>(
|
||||
|
||||
/// Compute all the dependencies for the standard library.
|
||||
fn calc_deps_of_std(
|
||||
mut state: &mut State<'_, '_>,
|
||||
state: &mut State<'_, '_>,
|
||||
std_roots: &HashMap<CompileKind, Vec<Unit>>,
|
||||
) -> CargoResult<Option<UnitGraph>> {
|
||||
if std_roots.is_empty() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user