Skip to content

Commit b6cfe71

Browse files
committed
compiler: fix some clippy needless_pass_by_ref_mut
warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_session\src\config.rs:2111:20 | 2111 | unstable_opts: &mut UnstableOptions, | ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&UnstableOptions` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
1 parent bf47641 commit b6cfe71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,7 +2108,7 @@ fn should_override_cgus_and_disable_thinlto(
21082108
fn collect_print_requests(
21092109
early_dcx: &EarlyDiagCtxt,
21102110
cg: &mut CodegenOptions,
2111-
unstable_opts: &mut UnstableOptions,
2111+
unstable_opts: &UnstableOptions,
21122112
matches: &getopts::Matches,
21132113
) -> Vec<PrintRequest> {
21142114
let mut prints = Vec::<PrintRequest>::new();
@@ -2732,6 +2732,8 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
27322732
}
27332733

27342734
if let Ok(graphviz_font) = std::env::var("RUSTC_GRAPHVIZ_FONT") {
2735+
// FIXME: this is only mutation of UnstableOptions here, move into
2736+
// UnstableOptions::build?
27352737
unstable_opts.graphviz_font = graphviz_font;
27362738
}
27372739

@@ -2781,7 +2783,7 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M
27812783
));
27822784
}
27832785

2784-
let prints = collect_print_requests(early_dcx, &mut cg, &mut unstable_opts, matches);
2786+
let prints = collect_print_requests(early_dcx, &mut cg, &unstable_opts, matches);
27852787

27862788
let cg = cg;
27872789

0 commit comments

Comments
 (0)