Skip to content

Commit 66057a7

Browse files
Fix invalid probe path
1 parent c11fe55 commit 66057a7

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
@@ -962,6 +962,12 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> {
962962
for step in steps.iter() {
963963
match self.pick_step(step) {
964964
Some(Ok(mut elems)) => ret.append(&mut elems),
965+
Some(Err(elem)) => {
966+
match self.looking_for {
967+
LookingFor::MethodName(_) => return Some(Err(elem)),
968+
LookingFor::ReturnType(_) => {}
969+
}
970+
}
965971
_ => {}
966972
}
967973
}

0 commit comments

Comments
 (0)