Skip to content

Commit ee7f4c3

Browse files
committed
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 rust-lang/rust#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
2 parents 393ce5b + b0a3103 commit ee7f4c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/unit_dependencies.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn build_unit_dependencies<'a, 'cfg>(
149149

150150
/// Compute all the dependencies for the standard library.
151151
fn calc_deps_of_std(
152-
mut state: &mut State<'_, '_>,
152+
state: &mut State<'_, '_>,
153153
std_roots: &HashMap<CompileKind, Vec<Unit>>,
154154
) -> CargoResult<Option<UnitGraph>> {
155155
if std_roots.is_empty() {

0 commit comments

Comments
 (0)