Skip to content

Commit 77af19e

Browse files
committed
remove unneeded mutable references (cippy::unnecessary_mut_passed)
1 parent cca3d52 commit 77af19e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_infer/traits/auto_trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
113113
return AutoTraitResult::ExplicitImpl;
114114
}
115115

116-
return tcx.infer_ctxt().enter(|mut infcx| {
116+
return tcx.infer_ctxt().enter(|infcx| {
117117
let mut fresh_preds = FxHashSet::default();
118118

119119
// Due to the way projections are handled by SelectionContext, we need to run
@@ -164,7 +164,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
164164

165165
let (full_env, full_user_env) = self
166166
.evaluate_predicates(
167-
&mut infcx,
167+
&infcx,
168168
trait_did,
169169
ty,
170170
new_env,

src/librustc_mir/transform/generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ fn create_generator_drop_shim<'tcx>(
944944
// unrelated code from the resume part of the function
945945
simplify::remove_dead_blocks(&mut body);
946946

947-
dump_mir(tcx, None, "generator_drop", &0, source, &mut body, |_, _| Ok(()));
947+
dump_mir(tcx, None, "generator_drop", &0, source, &body, |_, _| Ok(()));
948948

949949
body
950950
}

0 commit comments

Comments
 (0)