diff options
| author | klensy <klensy@users.noreply.github.com> | 2024-03-28 11:03:48 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2024-03-28 11:04:39 +0300 |
| commit | b6cfe71f3891db6b7883fc31a8acc37c4f13c8ec (patch) | |
| tree | 72febbd6dfaef62ae46ea429605d6afe056744e6 | |
| parent | bf476417265d23e9a3371cb0901039b3b1335312 (diff) | |
| download | rust-b6cfe71f3891db6b7883fc31a8acc37c4f13c8ec.tar.gz rust-b6cfe71f3891db6b7883fc31a8acc37c4f13c8ec.zip | |
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
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index f612e8b5b1a..ff8165c4f7b 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -2108,7 +2108,7 @@ fn should_override_cgus_and_disable_thinlto( fn collect_print_requests( early_dcx: &EarlyDiagCtxt, cg: &mut CodegenOptions, - unstable_opts: &mut UnstableOptions, + unstable_opts: &UnstableOptions, matches: &getopts::Matches, ) -> Vec<PrintRequest> { let mut prints = Vec::<PrintRequest>::new(); @@ -2732,6 +2732,8 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M } if let Ok(graphviz_font) = std::env::var("RUSTC_GRAPHVIZ_FONT") { + // FIXME: this is only mutation of UnstableOptions here, move into + // UnstableOptions::build? unstable_opts.graphviz_font = graphviz_font; } @@ -2781,7 +2783,7 @@ pub fn build_session_options(early_dcx: &mut EarlyDiagCtxt, matches: &getopts::M )); } - let prints = collect_print_requests(early_dcx, &mut cg, &mut unstable_opts, matches); + let prints = collect_print_requests(early_dcx, &mut cg, &unstable_opts, matches); let cg = cg; |
