librustc: Remove debug code and add scary warnings for rusti/rustpkg

This commit is contained in:
Patrick Walton 2013-03-20 11:44:01 -07:00
parent f8dab3a6c0
commit e72d011f68
3 changed files with 10 additions and 3 deletions

View File

@ -804,9 +804,9 @@ pub fn invoke(bcx: block, llfn: ValueRef, +llargs: ~[ValueRef]) -> block {
if bcx.unreachable { return bcx; }
match bcx.node_info {
None => error!("invoke at ???"),
None => debug!("invoke at ???"),
Some(node_info) => {
error!("invoke at %s",
debug!("invoke at %s",
bcx.sess().codemap.span_to_str(node_info.span));
}
}
@ -1512,7 +1512,7 @@ pub fn alloc_ty(bcx: block, t: ty::t) -> ValueRef {
let _icx = bcx.insn_ctxt("alloc_ty");
let ccx = bcx.ccx();
let llty = type_of::type_of(ccx, t);
if ty::type_has_params(t) { error!("%s", ty_to_str(ccx.tcx, t)); }
if ty::type_has_params(t) { debug!("%s", ty_to_str(ccx.tcx, t)); }
fail_unless!(!ty::type_has_params(t));
let val = alloca(bcx, llty);
return val;

View File

@ -386,6 +386,10 @@ pub fn main() {
stmts: ~""
};
io::println("WARNING: The Rust REPL is experimental and may be");
io::println("unstable. If you encounter problems, please use the");
io::println("compiler instead.");
unsafe {
do rl::complete |line, suggest| {
if line.starts_with(":") {

View File

@ -867,6 +867,9 @@ impl Ctx {
}
pub fn main() {
io::println("WARNING: The Rust package manager is experimental and may");
io::println("be unstable.");
let args = os::args();
let opts = ~[getopts::optflag(~"h"), getopts::optflag(~"help"),
getopts::optflag(~"j"), getopts::optflag(~"json"),