Skip to content

Commit

Permalink
Rollup merge of rust-lang#134521 - adetaylor:roll-loop, r=wesleywiser
Browse files Browse the repository at this point in the history
Arbitrary self types v2: roll loop.

Just for slightly more concise code - no functional changes.

r? `@wesleywiser`

Part of rust-lang#44874
  • Loading branch information
jhpratt authored Dec 20, 2024
2 parents ef47ba0 + 25a9d62 commit e6aea1a
Showing 1 changed file with 10 additions and 17 deletions.
27 changes: 10 additions & 17 deletions compiler/rustc_hir_typeck/src/method/probe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1229,23 +1229,16 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
if let Some(by_value_pick) = by_value_pick {
if let Ok(by_value_pick) = by_value_pick.as_ref() {
if by_value_pick.kind == PickKind::InherentImplPick {
if let Err(e) = self.check_for_shadowed_autorefd_method(
by_value_pick,
step,
self_ty,
hir::Mutability::Not,
track_unstable_candidates,
) {
return Some(Err(e));
}
if let Err(e) = self.check_for_shadowed_autorefd_method(
by_value_pick,
step,
self_ty,
hir::Mutability::Mut,
track_unstable_candidates,
) {
return Some(Err(e));
for mutbl in [hir::Mutability::Not, hir::Mutability::Mut] {
if let Err(e) = self.check_for_shadowed_autorefd_method(
by_value_pick,
step,
self_ty,
mutbl,
track_unstable_candidates,
) {
return Some(Err(e));
}
}
}
}
Expand Down

0 comments on commit e6aea1a

Please sign in to comment.