Skip to content

Commit 19fb17c

Browse files
Fix invalid probe path
1 parent a2cec1a commit 19fb17c

File tree

1 file changed

+6
-0
lines changed
  • src/librustc_typeck/check/method

1 file changed

+6
-0
lines changed

src/librustc_typeck/check/method/probe.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,12 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
970970
for step in steps.iter() {
971971
match self.pick_step(step) {
972972
Some(Ok(mut elems)) => ret.append(&mut elems),
973+
Some(Err(elem)) => {
974+
match self.looking_for {
975+
LookingFor::MethodName(_) => return Some(Err(elem)),
976+
LookingFor::ReturnType(_) => {}
977+
}
978+
}
973979
_ => {}
974980
}
975981
}

0 commit comments

Comments
 (0)