Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/librustc/middle/trans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions src/librusti/rusti.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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(":") {
Expand Down
3 changes: 3 additions & 0 deletions src/librustpkg/rustpkg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down