mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Actually call unreachable() in impossible case in type_of_inner
This commit is contained in:
parent
57ede5f281
commit
059b31f7a3
@ -210,9 +210,11 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
|
||||
ret T_struct([T_i32(), type_of_inner(cx, sp, sub1)]);
|
||||
}
|
||||
ty::ty_var(_) {
|
||||
// FIXME should be a constraint that makes this impossible
|
||||
// (use unreachable())
|
||||
cx.tcx.sess.span_fatal(sp, "trans::type_of called on ty_var");
|
||||
// Should be unreachable b/c of precondition.
|
||||
// FIXME: would be nice to have a way of expressing this
|
||||
// through postconditions, and then making it sound to omit
|
||||
// cases in the alt
|
||||
std::util::unreachable()
|
||||
}
|
||||
ty::ty_param(_, _) { T_typaram(cx.tn) }
|
||||
ty::ty_type. { T_ptr(cx.tydesc_type) }
|
||||
|
Loading…
Reference in New Issue
Block a user