Skip to content

Commit e9fe47b

Browse files
committed
rustc: Make ann_to_type() fail if the node has no type. Miraculously, no test cases fail.
1 parent e624249 commit e9fe47b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/comp/middle/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ fn eq_ty(&@t a, &@t b) -> bool {
596596
fn ann_to_type(&ast.ann ann) -> @t {
597597
alt (ann) {
598598
case (ast.ann_none) {
599-
// shouldn't happen, but can until the typechecker is complete
600-
ret plain_ty(ty_var(-1)); // FIXME: broken, broken, broken
599+
log "ann_to_type() called on node with no type";
600+
fail;
601601
}
602602
case (ast.ann_type(?ty, _)) {
603603
ret ty;

0 commit comments

Comments
 (0)