diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-10-30 18:25:45 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-12-20 11:37:15 +0100 |
| commit | 66057a7f7292c49eefae7cd386aa183201a49ca2 (patch) | |
| tree | f6b722456430856b00e143cbfb17029221a627c0 /src | |
| parent | c11fe553df269d6f47b4c48f5c47c08efdd373dc (diff) | |
| download | rust-66057a7f7292c49eefae7cd386aa183201a49ca2.tar.gz rust-66057a7f7292c49eefae7cd386aa183201a49ca2.zip | |
Fix invalid probe path
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_typeck/check/method/probe.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_typeck/check/method/probe.rs b/src/librustc_typeck/check/method/probe.rs index 4a63c967920..cbd1345a57e 100644 --- a/src/librustc_typeck/check/method/probe.rs +++ b/src/librustc_typeck/check/method/probe.rs @@ -962,6 +962,12 @@ impl<'a, 'gcx, 'tcx> ProbeContext<'a, 'gcx, 'tcx> { for step in steps.iter() { match self.pick_step(step) { Some(Ok(mut elems)) => ret.append(&mut elems), + Some(Err(elem)) => { + match self.looking_for { + LookingFor::MethodName(_) => return Some(Err(elem)), + LookingFor::ReturnType(_) => {} + } + } _ => {} } } |
