compiler: fix few needless_pass_by_ref_mut clippy lints
warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_session\src\config.rs:2013:16 | 2013 | early_dcx: &mut EarlyDiagCtxt, | ^^^^^^^^^^^^^^^^^^ help: consider changing to: `&EarlyDiagCtxt` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_ast_passes\src\ast_validation.rs:1555:11 | 1555 | this: &mut AstValidator<'_>, | ^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&AstValidator<'_>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_infer\src\infer\snapshot\fudge.rs:16:12 | 16 | table: &mut UnificationTable<'_, 'tcx, T>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&UnificationTable<'_, 'tcx, T>` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut warning: this argument is a mutable reference, but not used mutably --> compiler\rustc_expand\src\expand.rs:961:13 | 961 | parser: &mut Parser<'a>, | ^^^^^^^^^^^^^^^ help: consider changing to: `&Parser<'a>` | = warning: changing this function will impact semver compatibility = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
This commit is contained in:
parent
b6cfe71f38
commit
aa35530319
4 changed files with 8 additions and 8 deletions
|
@ -871,7 +871,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
|
|||
let mut parser = self.cx.new_parser_from_tts(toks);
|
||||
match parse_ast_fragment(&mut parser, kind) {
|
||||
Ok(fragment) => {
|
||||
ensure_complete_parse(&mut parser, path, kind.name(), span);
|
||||
ensure_complete_parse(&parser, path, kind.name(), span);
|
||||
fragment
|
||||
}
|
||||
Err(mut err) => {
|
||||
|
@ -958,7 +958,7 @@ pub fn parse_ast_fragment<'a>(
|
|||
}
|
||||
|
||||
pub fn ensure_complete_parse<'a>(
|
||||
parser: &mut Parser<'a>,
|
||||
parser: &Parser<'a>,
|
||||
macro_path: &ast::Path,
|
||||
kind_name: &str,
|
||||
span: Span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue