Skip to content

Commit a956b56

Browse files
authored
Improve comment clarity in candidate_may_shadow
1 parent 9e8a0c5 commit a956b56

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_hir_typeck/src/method

1 file changed

+2
-2
lines changed

‎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)