Skip to content

Commit 437c99a

Browse files
committed
---
yaml --- r: 53990 b: refs/heads/dist-snap c: 9c4d804 h: refs/heads/master v: v3
1 parent 4aa22ea commit 437c99a

File tree

14 files changed

+43
-56
lines changed

14 files changed

+43
-56
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: 9350d14ecb025f963198e9baa39679f808496785
10+
refs/heads/dist-snap: 9c4d804cfe421d9a48ba2f0c6d12b7c654e75964
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/comm.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ pub fn stream<T:Owned>() -> (Port<T>, Chan<T>) {
110110
// required.
111111
#[cfg(stage1)]
112112
#[cfg(stage2)]
113-
#[cfg(stage3)]
114113
pub impl<T: Owned> Chan<T> {
115114
fn send(&self, x: T) { chan_send(self, x) }
116115
fn try_send(&self, x: T) -> bool { chan_try_send(self, x) }
@@ -150,7 +149,6 @@ fn chan_try_send<T:Owned>(self: &Chan<T>, x: T) -> bool {
150149
// Use an inherent impl so that imports are not required:
151150
#[cfg(stage1)]
152151
#[cfg(stage2)]
153-
#[cfg(stage3)]
154152
pub impl<T: Owned> Port<T> {
155153
fn recv(&self) -> T { port_recv(self) }
156154
fn try_recv(&self) -> Option<T> { port_try_recv(self) }
@@ -228,7 +226,6 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{
228226
// Use an inherent impl so that imports are not required:
229227
#[cfg(stage1)]
230228
#[cfg(stage2)]
231-
#[cfg(stage3)]
232229
pub impl<T:Owned> PortSet<T> {
233230
fn recv(&self) -> T { port_set_recv(self) }
234231
fn try_recv(&self) -> Option<T> { port_set_try_recv(self) }
@@ -304,7 +301,6 @@ pub type SharedChan<T> = unstable::Exclusive<Chan<T>>;
304301
305302
#[cfg(stage1)]
306303
#[cfg(stage2)]
307-
#[cfg(stage3)]
308304
pub impl<T: Owned> SharedChan<T> {
309305
fn send(&self, x: T) { shared_chan_send(self, x) }
310306
fn try_send(&self, x: T) -> bool { shared_chan_try_send(self, x) }

branches/dist-snap/src/libcore/io.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ use libc;
2121
use libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t};
2222
use libc::consts::os::posix88::*;
2323
use os;
24-
use cast;
25-
use path::Path;
26-
use ops::Drop;
24+
use prelude::*;
2725
use ptr;
2826
use result;
2927
use str;
@@ -77,7 +75,6 @@ pub trait Reader {
7775

7876
#[cfg(stage1)]
7977
#[cfg(stage2)]
80-
#[cfg(stage3)]
8178
impl Reader for @Reader {
8279
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
8380
self.read(bytes, len)
@@ -660,7 +657,6 @@ pub trait Writer {
660657
661658
#[cfg(stage1)]
662659
#[cfg(stage2)]
663-
#[cfg(stage3)]
664660
impl Writer for @Writer {
665661
fn write(&self, v: &[const u8]) { self.write(v) }
666662
fn seek(&self, a: int, b: SeekStyle) { self.seek(a, b) }
@@ -990,7 +986,7 @@ pub trait WriterUtil {
990986

991987
impl<T:Writer> WriterUtil for T {
992988
fn write_char(&self, ch: char) {
993-
if ch as uint < 128u {
989+
if (ch as uint) < 128u {
994990
self.write(&[ch as u8]);
995991
} else {
996992
self.write_str(str::from_char(ch));

branches/dist-snap/src/libcore/num/strconv.rs

Lines changed: 3 additions & 3 deletions
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
_ => ()

branches/dist-snap/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
4343
pub use vec::{CopyableVector, ImmutableVector};
4444
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
4545
pub use vec::{OwnedVector, OwnedCopyableVector};
46-
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
4746

4847
/* Reexported runtime types */
4948
pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};

branches/dist-snap/src/libcore/repr.rs

Lines changed: 1 addition & 1 deletion
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 {

branches/dist-snap/src/libcore/unstable/extfmt.rs

Lines changed: 1 addition & 1 deletion
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()

branches/dist-snap/src/librustc/front/test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@ fn mk_tests(cx: &TestCtxt) -> @ast::item {
369369

370370
#[cfg(stage1)]
371371
#[cfg(stage2)]
372-
#[cfg(stage3)]
373372
fn mk_tests(cx: &TestCtxt) -> @ast::item {
374373

375374
let ext_cx = cx.ext_cx;

branches/dist-snap/src/librustdoc/markdown_pass.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn write_page(ctxt: &Ctxt, page: &doc::Page) {
127127
write_item_no_header(ctxt, doc);
128128
}
129129
}
130-
ctxt.w.put_done();
130+
ctxt.w.write_done();
131131
}
132132

133133
#[test]
@@ -146,8 +146,8 @@ fn should_request_new_writer_for_each_page() {
146146
}
147147

148148
fn write_title(ctxt: &Ctxt, page: doc::Page) {
149-
ctxt.w.put_line(fmt!("%% %s", make_title(page)));
150-
ctxt.w.put_line(~"");
149+
ctxt.w.write_line(fmt!("%% %s", make_title(page)));
150+
ctxt.w.write_line(~"");
151151
}
152152

153153
fn make_title(page: doc::Page) -> ~str {
@@ -198,8 +198,8 @@ fn write_header(ctxt: &Ctxt, lvl: Hlvl, doc: doc::ItemTag) {
198198
199199
fn write_header_(ctxt: &Ctxt, lvl: Hlvl, title: ~str) {
200200
let hashes = str::from_chars(vec::from_elem(lvl as uint, '#'));
201-
ctxt.w.put_line(fmt!("%s %s", hashes, title));
202-
ctxt.w.put_line(~"");
201+
ctxt.w.write_line(fmt!("%s %s", hashes, title));
202+
ctxt.w.write_line(~"");
203203
}
204204
205205
pub fn header_kind(doc: doc::ItemTag) -> ~str {
@@ -332,8 +332,8 @@ fn write_desc(
332332
) {
333333
match desc {
334334
Some(desc) => {
335-
ctxt.w.put_line(desc);
336-
ctxt.w.put_line(~"");
335+
ctxt.w.write_line(desc);
336+
ctxt.w.write_line(~"");
337337
}
338338
None => ()
339339
}
@@ -347,8 +347,8 @@ fn write_sections(ctxt: &Ctxt, sections: &[doc::Section]) {
347347

348348
fn write_section(ctxt: &Ctxt, section: doc::Section) {
349349
write_header_(ctxt, H4, copy section.header);
350-
ctxt.w.put_line(copy section.body);
351-
ctxt.w.put_line(~"");
350+
ctxt.w.write_line(copy section.body);
351+
ctxt.w.write_line(~"");
352352
}
353353

354354
#[test]
@@ -398,7 +398,7 @@ fn write_item_(ctxt: &Ctxt, doc: doc::ItemTag, write_header: bool) {
398398
doc::TraitTag(TraitDoc) => write_trait(ctxt, TraitDoc),
399399
doc::ImplTag(ImplDoc) => write_impl(ctxt, ImplDoc),
400400
doc::TyTag(TyDoc) => write_type(ctxt, TyDoc),
401-
doc::StructTag(StructDoc) => put_struct(ctxt, StructDoc),
401+
doc::StructTag(StructDoc) => write_struct(ctxt, StructDoc),
402402
}
403403
}
404404

@@ -428,13 +428,13 @@ fn write_index(ctxt: &Ctxt, index: doc::Index) {
428428
let header = header_text_(entry.kind, entry.name);
429429
let id = copy entry.link;
430430
if entry.brief.is_some() {
431-
ctxt.w.put_line(fmt!("* [%s](%s) - %s",
431+
ctxt.w.write_line(fmt!("* [%s](%s) - %s",
432432
header, id, (&entry.brief).get()));
433433
} else {
434-
ctxt.w.put_line(fmt!("* [%s](%s)", header, id));
434+
ctxt.w.write_line(fmt!("* [%s](%s)", header, id));
435435
}
436436
}
437-
ctxt.w.put_line(~"");
437+
ctxt.w.write_line(~"");
438438
}
439439
440440
#[test]
@@ -526,8 +526,8 @@ fn write_fnlike(
526526
fn write_sig(ctxt: &Ctxt, sig: Option<~str>) {
527527
match sig {
528528
Some(sig) => {
529-
ctxt.w.put_line(code_block_indent(sig));
530-
ctxt.w.put_line(~"");
529+
ctxt.w.write_line(code_block_indent(sig));
530+
ctxt.w.write_line(~"");
531531
}
532532
None => fail!(~"unimplemented")
533533
}
@@ -641,18 +641,18 @@ fn write_variants(
641641
write_variant(ctxt, copy *variant);
642642
}
643643
644-
ctxt.w.put_line(~"");
644+
ctxt.w.write_line(~"");
645645
}
646646
647647
fn write_variant(ctxt: &Ctxt, doc: doc::VariantDoc) {
648648
fail_unless!(doc.sig.is_some());
649649
let sig = (&doc.sig).get();
650650
match copy doc.desc {
651651
Some(desc) => {
652-
ctxt.w.put_line(fmt!("* `%s` - %s", sig, desc));
652+
ctxt.w.write_line(fmt!("* `%s` - %s", sig, desc));
653653
}
654654
None => {
655-
ctxt.w.put_line(fmt!("* `%s`", sig));
655+
ctxt.w.write_line(fmt!("* `%s`", sig));
656656
}
657657
}
658658
}
@@ -804,7 +804,7 @@ fn should_write_type_signature() {
804804
fail_unless!(str::contains(markdown, ~"\n\n type t = int\n\n"));
805805
}
806806

807-
fn put_struct(
807+
fn write_struct(
808808
ctxt: &Ctxt,
809809
doc: doc::StructDoc
810810
) {
@@ -813,7 +813,7 @@ fn put_struct(
813813
}
814814

815815
#[test]
816-
fn should_put_struct_header() {
816+
fn should_write_struct_header() {
817817
let markdown = test::render(~"struct S { field: () }");
818818
fail_unless!(str::contains(markdown, ~"## Struct `S`\n\n"));
819819
}

branches/dist-snap/src/librustdoc/markdown_writer.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,21 @@ pub type Writer = ~fn(v: WriteInstr);
3434
pub type WriterFactory = ~fn(page: doc::Page) -> Writer;
3535

3636
pub trait WriterUtils {
37-
fn put_str(&self, +str: ~str);
38-
fn put_line(&self, +str: ~str);
39-
fn put_done(&self);
37+
fn write_str(&self, +str: ~str);
38+
fn write_line(&self, +str: ~str);
39+
fn write_done(&self);
4040
}
4141

4242
impl WriterUtils for Writer {
43-
fn put_str(&self, str: ~str) {
43+
fn write_str(&self, str: ~str) {
4444
(*self)(Write(str));
4545
}
4646

47-
fn put_line(&self, str: ~str) {
48-
self.put_str(str + ~"\n");
47+
fn write_line(&self, str: ~str) {
48+
self.write_str(str + ~"\n");
4949
}
5050

51-
fn put_done(&self) {
51+
fn write_done(&self) {
5252
(*self)(Done)
5353
}
5454
}

branches/dist-snap/src/libstd/comm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pub struct DuplexStream<T, U> {
2828
// Allow these methods to be used without import:
2929
#[cfg(stage1)]
3030
#[cfg(stage2)]
31-
#[cfg(stage3)]
3231
pub impl<T:Owned,U:Owned> DuplexStream<T, U> {
3332
fn send(&self, x: T) {
3433
self.chan.send(x)

branches/dist-snap/src/libstd/time.rs

Lines changed: 2 additions & 2 deletions
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),

branches/dist-snap/src/libsyntax/parse/parser.rs

Lines changed: 4 additions & 2 deletions
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");

branches/dist-snap/src/libsyntax/print/pprust.rs

Lines changed: 2 additions & 6 deletions
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)