Skip to content

Commit 959736d

Browse files
Rollup merge of #150698 - hkBst:patch-6, r=jdonszelmann
Improve comment clarity in candidate_may_shadow I think this should be the right correction, but I'm not sure.
2 parents dd08360 + a956b56 commit 959736d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • compiler/rustc_hir_typeck/src/method

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ impl PickConstraintsForShadowed {
190190
// An item never shadows itself
191191
candidate.item.def_id != self.def_id
192192
// and we're only concerned about inherent impls doing the shadowing.
193-
// Shadowing can only occur if the shadowed is further along
194-
// the Receiver dereferencing chain than the shadowed.
193+
// Shadowing can only occur if the impl being shadowed is further along
194+
// the Receiver dereferencing chain than the impl doing the shadowing.
195195
&& match candidate.kind {
196196
CandidateKind::InherentImplCandidate { receiver_steps, .. } => match self.receiver_steps {
197197
Some(shadowed_receiver_steps) => receiver_steps > shadowed_receiver_steps,

0 commit comments

Comments
 (0)