diff --git a/src/libcore/io.rs b/src/libcore/io.rs index 50e7a42b7b17c..b0e8a47605beb 100644 --- a/src/libcore/io.rs +++ b/src/libcore/io.rs @@ -986,7 +986,7 @@ pub trait WriterUtil { impl WriterUtil for T { fn write_char(&self, ch: char) { - if ch as uint < 128u { + if (ch as uint) < 128u { self.write(&[ch as u8]); } else { self.write_str(str::from_char(ch)); diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs index 50fc1b03ccc2e..d471eda74c66b 100644 --- a/src/libcore/num/strconv.rs +++ b/src/libcore/num/strconv.rs @@ -165,7 +165,7 @@ pub pure fn to_str_bytes_common+Neg+Modulo+Mul>( num: &T, radix: uint, negative_zero: bool, sign: SignFormat, digits: SignificantDigits) -> (~[u8], bool) { - if radix as int < 2 { + if (radix as int) < 2 { fail!(fmt!("to_str_bytes_common: radix %? to low, \ must lie in the range [2, 36]", radix)); } else if radix as int > 36 { @@ -455,10 +455,10 @@ pub pure fn from_str_bytes_common+ _ if special && radix >= DIGIT_I_RADIX // first digit of 'inf' => fail!(fmt!("from_str_bytes_common: radix %? incompatible with \ special values 'inf' and 'NaN'", radix)), - _ if radix as int < 2 + _ if (radix as int) < 2 => fail!(fmt!("from_str_bytes_common: radix %? to low, \ must lie in the range [2, 36]", radix)), - _ if radix as int > 36 + _ if (radix as int) > 36 => fail!(fmt!("from_str_bytes_common: radix %? to high, \ must lie in the range [2, 36]", radix)), _ => () diff --git a/src/libcore/repr.rs b/src/libcore/repr.rs index 83df9b7c00fc3..73c3ea91604b6 100644 --- a/src/libcore/repr.rs +++ b/src/libcore/repr.rs @@ -242,7 +242,7 @@ pub impl ReprVisitor { let (sz, al) = unsafe { ((*inner).size, (*inner).align) }; self.writer.write_char('['); let mut first = true; - while p as uint < end as uint { + while (p as uint) < (end as uint) { if first { first = false; } else { diff --git a/src/libcore/unstable/extfmt.rs b/src/libcore/unstable/extfmt.rs index b682f88b70e53..45766e97260b3 100644 --- a/src/libcore/unstable/extfmt.rs +++ b/src/libcore/unstable/extfmt.rs @@ -536,7 +536,7 @@ pub mod rt { // displayed let mut unpadded = match cv.precision { CountImplied => s.to_owned(), - CountIs(max) => if max as uint < str::char_len(s) { + CountIs(max) => if (max as uint) < str::char_len(s) { str::substr(s, 0, max as uint) } else { s.to_owned() diff --git a/src/librustc/back/link.rs b/src/librustc/back/link.rs index 84836568029be..76367b352ebba 100644 --- a/src/librustc/back/link.rs +++ b/src/librustc/back/link.rs @@ -818,11 +818,7 @@ pub fn link_binary(sess: Session, do cstore::iter_crate_data(cstore) |crate_num, _| { let link_args = csearch::get_link_args_for_crate(cstore, crate_num); do vec::consume(link_args) |_, link_arg| { - // Linker arguments that don't begin with - are likely file names, - // so they should not be necessary. - if link_arg.starts_with("-") { - cc_args.push(link_arg); - } + cc_args.push(link_arg); } } diff --git a/src/librustc/middle/trans/base.rs b/src/librustc/middle/trans/base.rs index 55cf1ae23b8fc..26700b83c9f1e 100644 --- a/src/librustc/middle/trans/base.rs +++ b/src/librustc/middle/trans/base.rs @@ -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; diff --git a/src/librusti/rusti.rc b/src/librusti/rusti.rc index 182cfc43ade9e..ed07ea1a448fe 100644 --- a/src/librusti/rusti.rc +++ b/src/librusti/rusti.rc @@ -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(":") { diff --git a/src/librustpkg/rustpkg.rc b/src/librustpkg/rustpkg.rc index 5b9f3c3cd229e..c2e3ce04f0645 100644 --- a/src/librustpkg/rustpkg.rc +++ b/src/librustpkg/rustpkg.rc @@ -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"), diff --git a/src/libstd/time.rs b/src/libstd/time.rs index d768eef9a8c9b..c72b3675c4cb5 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -819,8 +819,8 @@ priv fn do_strftime(format: &str, tm: &Tm) -> ~str { 'M' => fmt!("%02d", tm.tm_min as int), 'm' => fmt!("%02d", tm.tm_mon as int + 1), 'n' => ~"\n", - 'P' => if tm.tm_hour as int < 12 { ~"am" } else { ~"pm" }, - 'p' => if tm.tm_hour as int < 12 { ~"AM" } else { ~"PM" }, + 'P' => if (tm.tm_hour as int) < 12 { ~"am" } else { ~"pm" }, + 'p' => if (tm.tm_hour as int) < 12 { ~"AM" } else { ~"PM" }, 'R' => { fmt!("%s:%s", parse_type('H', tm), diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 8e4115855dbdb..930860d1b50e8 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -581,7 +581,9 @@ pub impl Parser { } } - fn parse_ty(&self, colons_before_params: bool) -> @Ty { + // Useless second parameter for compatibility with quasiquote macros. + // Bleh! + fn parse_ty(&self, _: bool) -> @Ty { maybe_whole!(self, nt_ty); let lo = self.span.lo; @@ -661,7 +663,7 @@ pub impl Parser { result } else if *self.token == token::MOD_SEP || is_ident_or_path(&*self.token) { - let path = self.parse_path_with_tps(colons_before_params); + let path = self.parse_path_with_tps(false); ty_path(path, self.get_id()) } else { self.fatal(~"expected type"); diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index 0937091cd1318..69b3bc9d6c7ba 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -370,10 +370,6 @@ pub fn print_opt_lifetime(s: @ps, lifetime: Option<@ast::Lifetime>) { } pub fn print_type(s: @ps, &&ty: @ast::Ty) { - print_type_ex(s, ty, false); -} - -pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) { maybe_print_comment(s, ty.span.lo); ibox(s, 0u); match /*bad*/ copy ty.node { @@ -415,7 +411,7 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) { f.purity, f.onceness, &f.decl, None, None, None); } - ast::ty_path(path, _) => print_path(s, path, print_colons), + ast::ty_path(path, _) => print_path(s, path, false), ast::ty_fixed_length_vec(mt, v) => { word(s.s, ~"["); match mt.mutbl { @@ -1211,7 +1207,7 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) { print_expr(s, expr); space(s.s); word_space(s, ~"as"); - print_type_ex(s, ty, true); + print_type(s, ty); } ast::expr_if(test, ref blk, elseopt) => { print_if(s, test, blk, elseopt, false);