Skip to content

Commit 6076826

Browse files
committed
---
yaml --- r: 50812 b: refs/heads/try c: bb9e1e2 h: refs/heads/master v: v3
1 parent be39e9e commit 6076826

File tree

9 files changed

+42
-49
lines changed

9 files changed

+42
-49
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: 373504a7ac6801293ae65316625ace667842f5b8
5+
refs/heads/try: bb9e1e2660990012c35ee975530b0b8b3136baf0
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libcore/io.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ 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 prelude::*;
24+
use cast;
25+
use path::Path;
26+
use ops::Drop;
2527
use ptr;
2628
use result;
2729
use str;

branches/try/src/libcore/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ 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};
4647

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

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,9 +804,9 @@ pub fn invoke(bcx: block, llfn: ValueRef, +llargs: ~[ValueRef]) -> block {
804804
if bcx.unreachable { return bcx; }
805805

806806
match bcx.node_info {
807-
None => error!("invoke at ???"),
807+
None => debug!("invoke at ???"),
808808
Some(node_info) => {
809-
error!("invoke at %s",
809+
debug!("invoke at %s",
810810
bcx.sess().codemap.span_to_str(node_info.span));
811811
}
812812
}
@@ -1512,7 +1512,7 @@ pub fn alloc_ty(bcx: block, t: ty::t) -> ValueRef {
15121512
let _icx = bcx.insn_ctxt("alloc_ty");
15131513
let ccx = bcx.ccx();
15141514
let llty = type_of::type_of(ccx, t);
1515-
if ty::type_has_params(t) { error!("%s", ty_to_str(ccx.tcx, t)); }
1515+
if ty::type_has_params(t) { debug!("%s", ty_to_str(ccx.tcx, t)); }
15161516
fail_unless!(!ty::type_has_params(t));
15171517
let val = alloca(bcx, llty);
15181518
return val;

branches/try/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.write_done();
130+
ctxt.w.put_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.write_line(fmt!("%% %s", make_title(page)));
150-
ctxt.w.write_line(~"");
149+
ctxt.w.put_line(fmt!("%% %s", make_title(page)));
150+
ctxt.w.put_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.write_line(fmt!("%s %s", hashes, title));
202-
ctxt.w.write_line(~"");
201+
ctxt.w.put_line(fmt!("%s %s", hashes, title));
202+
ctxt.w.put_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.write_line(desc);
336-
ctxt.w.write_line(~"");
335+
ctxt.w.put_line(desc);
336+
ctxt.w.put_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.write_line(copy section.body);
351-
ctxt.w.write_line(~"");
350+
ctxt.w.put_line(copy section.body);
351+
ctxt.w.put_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) => write_struct(ctxt, StructDoc),
401+
doc::StructTag(StructDoc) => put_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.write_line(fmt!("* [%s](%s) - %s",
431+
ctxt.w.put_line(fmt!("* [%s](%s) - %s",
432432
header, id, (&entry.brief).get()));
433433
} else {
434-
ctxt.w.write_line(fmt!("* [%s](%s)", header, id));
434+
ctxt.w.put_line(fmt!("* [%s](%s)", header, id));
435435
}
436436
}
437-
ctxt.w.write_line(~"");
437+
ctxt.w.put_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.write_line(code_block_indent(sig));
530-
ctxt.w.write_line(~"");
529+
ctxt.w.put_line(code_block_indent(sig));
530+
ctxt.w.put_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.write_line(~"");
644+
ctxt.w.put_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.write_line(fmt!("* `%s` - %s", sig, desc));
652+
ctxt.w.put_line(fmt!("* `%s` - %s", sig, desc));
653653
}
654654
None => {
655-
ctxt.w.write_line(fmt!("* `%s`", sig));
655+
ctxt.w.put_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 write_struct(
807+
fn put_struct(
808808
ctxt: &Ctxt,
809809
doc: doc::StructDoc
810810
) {
@@ -813,7 +813,7 @@ fn write_struct(
813813
}
814814

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

branches/try/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 write_str(&self, +str: ~str);
38-
fn write_line(&self, +str: ~str);
39-
fn write_done(&self);
37+
fn put_str(&self, +str: ~str);
38+
fn put_line(&self, +str: ~str);
39+
fn put_done(&self);
4040
}
4141

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

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

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

branches/try/src/librusti/rusti.rc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ pub fn main() {
386386
stmts: ~""
387387
};
388388

389+
io::println("WARNING: The Rust REPL is experimental and may be");
390+
io::println("unstable. If you encounter problems, please use the");
391+
io::println("compiler instead.");
392+
389393
unsafe {
390394
do rl::complete |line, suggest| {
391395
if line.starts_with(":") {

branches/try/src/librustpkg/rustpkg.rc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,9 @@ impl Ctx {
867867
}
868868

869869
pub fn main() {
870+
io::println("WARNING: The Rust package manager is experimental and may");
871+
io::println("be unstable.");
872+
870873
let args = os::args();
871874
let opts = ~[getopts::optflag(~"h"), getopts::optflag(~"help"),
872875
getopts::optflag(~"j"), getopts::optflag(~"json"),

branches/try/src/test/run-pass/issue-4120.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)