Skip to content

Commit b12714e

Browse files
committed
auto merge of #5455 : pcwalton/rust/framework, r=catamorphism
r? @catamorphism
2 parents 6f3d168 + a29934a commit b12714e

File tree

8 files changed

+15
-21
lines changed

8 files changed

+15
-21
lines changed

src/libcore/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ pub trait WriterUtil {
986986

987987
impl<T:Writer> WriterUtil for T {
988988
fn write_char(&self, ch: char) {
989-
if ch as uint < 128u {
989+
if (ch as uint) < 128u {
990990
self.write(&[ch as u8]);
991991
} else {
992992
self.write_str(str::from_char(ch));

src/libcore/num/strconv.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
165165
Div<T,T>+Neg<T>+Modulo<T,T>+Mul<T,T>>(
166166
num: &T, radix: uint, negative_zero: bool,
167167
sign: SignFormat, digits: SignificantDigits) -> (~[u8], bool) {
168-
if radix as int < 2 {
168+
if (radix as int) < 2 {
169169
fail!(fmt!("to_str_bytes_common: radix %? to low, \
170170
must lie in the range [2, 36]", radix));
171171
} else if radix as int > 36 {
@@ -455,10 +455,10 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
455455
_ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
456456
=> fail!(fmt!("from_str_bytes_common: radix %? incompatible with \
457457
special values 'inf' and 'NaN'", radix)),
458-
_ if radix as int < 2
458+
_ if (radix as int) < 2
459459
=> fail!(fmt!("from_str_bytes_common: radix %? to low, \
460460
must lie in the range [2, 36]", radix)),
461-
_ if radix as int > 36
461+
_ if (radix as int) > 36
462462
=> fail!(fmt!("from_str_bytes_common: radix %? to high, \
463463
must lie in the range [2, 36]", radix)),
464464
_ => ()

src/libcore/repr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pub impl ReprVisitor {
242242
let (sz, al) = unsafe { ((*inner).size, (*inner).align) };
243243
self.writer.write_char('[');
244244
let mut first = true;
245-
while p as uint < end as uint {
245+
while (p as uint) < (end as uint) {
246246
if first {
247247
first = false;
248248
} else {

src/libcore/unstable/extfmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ pub mod rt {
536536
// displayed
537537
let mut unpadded = match cv.precision {
538538
CountImplied => s.to_owned(),
539-
CountIs(max) => if max as uint < str::char_len(s) {
539+
CountIs(max) => if (max as uint) < str::char_len(s) {
540540
str::substr(s, 0, max as uint)
541541
} else {
542542
s.to_owned()

src/librustc/back/link.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -849,11 +849,7 @@ pub fn link_binary(sess: Session,
849849
do cstore::iter_crate_data(cstore) |crate_num, _| {
850850
let link_args = csearch::get_link_args_for_crate(cstore, crate_num);
851851
do vec::consume(link_args) |_, link_arg| {
852-
// Linker arguments that don't begin with - are likely file names,
853-
// so they should not be necessary.
854-
if link_arg.starts_with("-") {
855-
cc_args.push(link_arg);
856-
}
852+
cc_args.push(link_arg);
857853
}
858854
}
859855

src/libstd/time.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,8 @@ priv fn do_strftime(format: &str, tm: &Tm) -> ~str {
819819
'M' => fmt!("%02d", tm.tm_min as int),
820820
'm' => fmt!("%02d", tm.tm_mon as int + 1),
821821
'n' => ~"\n",
822-
'P' => if tm.tm_hour as int < 12 { ~"am" } else { ~"pm" },
823-
'p' => if tm.tm_hour as int < 12 { ~"AM" } else { ~"PM" },
822+
'P' => if (tm.tm_hour as int) < 12 { ~"am" } else { ~"pm" },
823+
'p' => if (tm.tm_hour as int) < 12 { ~"AM" } else { ~"PM" },
824824
'R' => {
825825
fmt!("%s:%s",
826826
parse_type('H', tm),

src/libsyntax/parse/parser.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ pub impl Parser {
581581
}
582582
}
583583

584-
fn parse_ty(&self, colons_before_params: bool) -> @Ty {
584+
// Useless second parameter for compatibility with quasiquote macros.
585+
// Bleh!
586+
fn parse_ty(&self, _: bool) -> @Ty {
585587
maybe_whole!(self, nt_ty);
586588

587589
let lo = self.span.lo;
@@ -661,7 +663,7 @@ pub impl Parser {
661663
result
662664
} else if *self.token == token::MOD_SEP
663665
|| is_ident_or_path(&*self.token) {
664-
let path = self.parse_path_with_tps(colons_before_params);
666+
let path = self.parse_path_with_tps(false);
665667
ty_path(path, self.get_id())
666668
} else {
667669
self.fatal(~"expected type");

src/libsyntax/print/pprust.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,6 @@ pub fn print_opt_lifetime(s: @ps, lifetime: Option<@ast::Lifetime>) {
370370
}
371371
372372
pub fn print_type(s: @ps, &&ty: @ast::Ty) {
373-
print_type_ex(s, ty, false);
374-
}
375-
376-
pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) {
377373
maybe_print_comment(s, ty.span.lo);
378374
ibox(s, 0u);
379375
match ty.node {
@@ -415,7 +411,7 @@ pub fn print_type_ex(s: @ps, &&ty: @ast::Ty, print_colons: bool) {
415411
f.purity, f.onceness, &f.decl, None,
416412
None, None);
417413
}
418-
ast::ty_path(path, _) => print_path(s, path, print_colons),
414+
ast::ty_path(path, _) => print_path(s, path, false),
419415
ast::ty_fixed_length_vec(ref mt, v) => {
420416
word(s.s, ~"[");
421417
match mt.mutbl {
@@ -1211,7 +1207,7 @@ pub fn print_expr(s: @ps, &&expr: @ast::expr) {
12111207
print_expr(s, expr);
12121208
space(s.s);
12131209
word_space(s, ~"as");
1214-
print_type_ex(s, ty, true);
1210+
print_type(s, ty);
12151211
}
12161212
ast::expr_if(test, ref blk, elseopt) => {
12171213
print_if(s, test, blk, elseopt, false);

0 commit comments

Comments
 (0)