Skip to content

Commit 22b702a

Browse files
committed
---
yaml --- r: 5329 b: refs/heads/master c: 059b31f h: refs/heads/master i: 5327: 24d73ea v: v3
1 parent 5150416 commit 22b702a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 57ede5f281a406986d4167bbca137d09e6a7f565
2+
refs/heads/master: 059b31f7a3a58193db1dc80a3bd32cbb36f00e1d

trunk/src/comp/middle/trans.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,11 @@ fn type_of_inner(cx: @crate_ctxt, sp: span, t: ty::t)
210210
ret T_struct([T_i32(), type_of_inner(cx, sp, sub1)]);
211211
}
212212
ty::ty_var(_) {
213-
// FIXME should be a constraint that makes this impossible
214-
// (use unreachable())
215-
cx.tcx.sess.span_fatal(sp, "trans::type_of called on ty_var");
213+
// Should be unreachable b/c of precondition.
214+
// FIXME: would be nice to have a way of expressing this
215+
// through postconditions, and then making it sound to omit
216+
// cases in the alt
217+
std::util::unreachable()
216218
}
217219
ty::ty_param(_, _) { T_typaram(cx.tn) }
218220
ty::ty_type. { T_ptr(cx.tydesc_type) }

0 commit comments

Comments
 (0)