diff options
| author | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2017-04-27 16:40:49 +0300 |
|---|---|---|
| committer | Ariel Ben-Yehuda <ariel.byd@gmail.com> | 2017-04-27 16:44:27 +0300 |
| commit | a260df27e0be9a2dd154376ee65c4c5d107927c0 (patch) | |
| tree | 933ec4583319bd19f3985f301c7c35a2ff9a1898 /src/librustc_errors | |
| parent | 54ef80043a3864495555c96791118ab3a725fe6b (diff) | |
| download | rust-a260df27e0be9a2dd154376ee65c4c5d107927c0.tar.gz rust-a260df27e0be9a2dd154376ee65c4c5d107927c0.zip | |
typeck: resolve type vars before calling `try_index_step`
`try_index_step` does not resolve type variables by itself and would fail otherwise. Also harden the failure path in `confirm` to cause less confusing errors.
Diffstat (limited to 'src/librustc_errors')
| -rw-r--r-- | src/librustc_errors/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs index da29e354a70..cc8012d965a 100644 --- a/src/librustc_errors/lib.rs +++ b/src/librustc_errors/lib.rs @@ -375,6 +375,9 @@ impl Handler { panic!(ExplicitBug); } pub fn delay_span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: &str) { + if self.treat_err_as_bug { + self.span_bug(sp, msg); + } let mut delayed = self.delayed_span_bug.borrow_mut(); *delayed = Some((sp.into(), msg.to_string())); } |
