Auto merge of #32267 - durka:inclusive-range-error, r=nrc

melt the ICE when lowering an impossible range

Emit a fatal error instead of panicking when HIR lowering encounters a range with no `end` point.

This involved adding a method to wire up `LoweringContext::span_fatal`.

Fixes #32245 (cc @nodakai).

r? @nrc
This commit is contained in:
bors 2016-03-28 15:08:49 -07:00
commit 44a77f6769
6 changed files with 88 additions and 32 deletions

View file

@ -348,6 +348,10 @@ impl NodeIdAssigner for Session {
fn peek_node_id(&self) -> NodeId {
self.next_node_id.get().checked_add(1).unwrap()
}
fn diagnostic(&self) -> &errors::Handler {
self.diagnostic()
}
}
fn split_msg_into_multilines(msg: &str) -> Option<String> {