Skip to content

Commit 551fb13

Browse files
catamorphismgraydon
authored andcommitted
Add a "fail" after a while(true) loop in two places
(in preparation for changing the "function may not return" warning to an error)
1 parent a08a376 commit 551fb13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/comp/middle/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ fn lookup_in_scope(&env e, list[scope] sc, &span sp, &ident id, namespace ns)
521521
}
522522
}
523523
}
524-
fail;
524+
e.sess.bug("reached unreachable code in lookup_in_scope"); // sigh
525525
}
526526

527527
fn lookup_in_ty_params(&ident id, &vec[ast::ty_param] ty_params)
@@ -757,7 +757,7 @@ fn lookup_in_local_mod(&env e, def_id defid, &ident id, namespace ns,
757757
}
758758
}
759759
}
760-
fail;
760+
e.sess.bug("reached unreachable code in lookup_in_regular_mod"); // sigh
761761
}
762762

763763
fn lookup_in_mie(&env e, &mod_index_entry mie, namespace ns)

0 commit comments

Comments
 (0)