Skip to content

Commit 9ff3780

Browse files
committed
---
yaml --- r: 73331 b: refs/heads/dist-snap c: 6e50515 h: refs/heads/master i: 73329: a24ad84 73327: bedf586 v: v3
1 parent 72b916d commit 9ff3780

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2028
-1886
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: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 70222b7e86da5a813f9bcf60d884389fc8b04ef7
10+
refs/heads/dist-snap: 6e5051553050974eb9362e1465cc2d40e2c9a610
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/rt/context.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ fn new_regs() -> ~Registers { ~([0, .. 32]) }
183183

184184
#[cfg(target_arch = "mips")]
185185
fn initialize_call_frame(regs: &mut Registers, fptr: *c_void, arg: *c_void, sp: *mut uint) {
186-
let sp = mut_offset(sp, -1);
186+
let sp = align_down(sp);
187+
// sp of mips o32 is 8-byte aligned
188+
let sp = mut_offset(sp, -2);
187189

188190
// The final return address. 0 indicates the bottom of the stack
189191
unsafe { *sp = 0; }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use old_iter;
2222
use iterator::Iterator;
2323
use kinds::Copy;
2424
use libc;
25-
use old_iter::{BaseIter, CopyableIter};
25+
use old_iter::CopyableIter;
2626
use option::{None, Option, Some};
2727
use ptr::to_unsafe_ptr;
2828
use ptr;

branches/dist-snap/src/libfuzzer/fuzzer.rc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum test_mode { tm_converge, tm_run, }
3838
pub struct Context { mode: test_mode } // + rng
3939

4040
pub fn write_file(filename: &Path, content: &str) {
41-
result::get(&io::file_writer(filename, [io::Create, io::Truncate]))
41+
result::get(&io::file_writer(filename, ~[io::Create, io::Truncate]))
4242
.write_str(content);
4343
}
4444

@@ -47,12 +47,12 @@ pub fn contains(haystack: &str, needle: &str) -> bool {
4747
}
4848

4949
pub fn find_rust_files(files: &mut ~[Path], path: &Path) {
50-
if path.filetype() == Some(~".rs") && !contains(path.to_str(), "utf8") {
50+
if path.filetype() == Some(~".rs") && !contains(path.to_str(), ~"utf8") {
5151
// ignoring "utf8" tests because something is broken
5252
files.push(path.clone());
5353
} else if os::path_is_dir(path)
54-
&& !contains(path.to_str(), "compile-fail")
55-
&& !contains(path.to_str(), "build") {
54+
&& !contains(path.to_str(), ~"compile-fail")
55+
&& !contains(path.to_str(), ~"build") {
5656
for os::list_dir_path(path).each |p| {
5757
find_rust_files(&mut *files, *p);
5858
}
@@ -406,34 +406,34 @@ pub fn check_whole_compiler(code: &str,
406406

407407
pub fn removeIfExists(filename: &Path) {
408408
// So sketchy!
409-
assert!(!contains(filename.to_str(), " "));
410-
run::program_output("bash", [~"-c", ~"rm " + filename.to_str()]);
409+
assert!(!contains(filename.to_str(), ~" "));
410+
run::program_output(~"bash", ~[~"-c", ~"rm " + filename.to_str()]);
411411
}
412412

413413
pub fn removeDirIfExists(filename: &Path) {
414414
// So sketchy!
415-
assert!(!contains(filename.to_str(), " "));
416-
run::program_output("bash", [~"-c", ~"rm -r " + filename.to_str()]);
415+
assert!(!contains(filename.to_str(), ~" "));
416+
run::program_output(~"bash", ~[~"-c", ~"rm -r " + filename.to_str()]);
417417
}
418418

419419
pub fn check_running(exe_filename: &Path) -> happiness {
420420
let p = run::program_output(
421-
"/Users/jruderman/scripts/timed_run_rust_program.py",
422-
[exe_filename.to_str()]);
421+
~"/Users/jruderman/scripts/timed_run_rust_program.py",
422+
~[exe_filename.to_str()]);
423423
let comb = p.out + ~"\n" + p.err;
424424
if str::len(comb) > 1u {
425425
error!("comb comb comb: %?", comb);
426426
}
427427

428-
if contains(comb, "Assertion failed:") {
428+
if contains(comb, ~"Assertion failed:") {
429429
failed(~"C++ assertion failure")
430-
} else if contains(comb, "leaked memory in rust main loop") {
430+
} else if contains(comb, ~"leaked memory in rust main loop") {
431431
// might also use exit code 134
432432
//failed("Leaked")
433433
known_bug(~"https://github.com/mozilla/rust/issues/910")
434-
} else if contains(comb, "src/rt/") {
434+
} else if contains(comb, ~"src/rt/") {
435435
failed(~"Mentioned src/rt/")
436-
} else if contains(comb, "malloc") {
436+
} else if contains(comb, ~"malloc") {
437437
failed(~"Mentioned malloc")
438438
} else {
439439
match p.status {
@@ -457,26 +457,26 @@ pub fn check_running(exe_filename: &Path) -> happiness {
457457

458458
pub fn check_compiling(filename: &Path) -> happiness {
459459
let p = run::program_output(
460-
"/Users/jruderman/code/rust/build/x86_64-apple-darwin/\
460+
~"/Users/jruderman/code/rust/build/x86_64-apple-darwin/\
461461
stage1/bin/rustc",
462-
[filename.to_str()]);
462+
~[filename.to_str()]);
463463

464464
//error!("Status: %d", p.status);
465465
if p.status == 0 {
466466
passed
467467
} else if p.err != ~"" {
468-
if contains(p.err, "error:") {
468+
if contains(p.err, ~"error:") {
469469
cleanly_rejected(~"rejected with span_error")
470470
} else {
471471
error!("Stderr: %?", p.err);
472472
failed(~"Unfamiliar error message")
473473
}
474-
} else if contains(p.out, "Assertion") && contains(p.out, "failed") {
474+
} else if contains(p.out, ~"Assertion") && contains(p.out, ~"failed") {
475475
error!("Stdout: %?", p.out);
476476
failed(~"Looks like an llvm assertion failure")
477-
} else if contains(p.out, "internal compiler error unimplemented") {
477+
} else if contains(p.out, ~"internal compiler error unimplemented") {
478478
known_bug(~"Something unimplemented")
479-
} else if contains(p.out, "internal compiler error") {
479+
} else if contains(p.out, ~"internal compiler error") {
480480
error!("Stdout: %?", p.out);
481481
failed(~"internal compiler error")
482482

@@ -603,8 +603,8 @@ pub fn check_roundtrip_convergence(code: @~str, maxIters: uint) {
603603
error!("Did not converge after %u iterations!", i);
604604
write_file(&Path("round-trip-a.rs"), *oldv);
605605
write_file(&Path("round-trip-b.rs"), *newv);
606-
run::run_program("diff",
607-
[~"-w", ~"-u", ~"round-trip-a.rs",
606+
run::run_program(~"diff",
607+
~[~"-w", ~"-u", ~"round-trip-a.rs",
608608
~"round-trip-b.rs"]);
609609
fail!("Mismatch");
610610
}
@@ -635,7 +635,7 @@ pub fn check_variants(files: &[Path], cx: Context) {
635635
}
636636

637637
let s = @result::get(&io::read_whole_file_str(file));
638-
if contains(*s, "#") {
638+
if contains(*s, ~"#") {
639639
loop; // Macros are confusing
640640
}
641641
if cx.mode == tm_converge && content_might_not_converge(*s) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use syntax::ast_util::*;
1717
use syntax::attr;
1818
use syntax::codemap::{dummy_sp, span, ExpandedFrom, CallInfo, NameAndSpan};
1919
use syntax::codemap;
20-
use syntax::ext::base::{mk_ctxt, ext_ctxt};
20+
use syntax::ext::base::ExtCtxt;
2121
use syntax::fold;
2222
use syntax::print::pprust;
2323
use syntax::{ast, ast_util};
@@ -36,7 +36,7 @@ struct TestCtxt {
3636
sess: session::Session,
3737
crate: @ast::crate,
3838
path: ~[ast::ident],
39-
ext_cx: @ext_ctxt,
39+
ext_cx: @ExtCtxt,
4040
testfns: ~[Test]
4141
}
4242

@@ -64,7 +64,7 @@ fn generate_test_harness(sess: session::Session,
6464
let cx: @mut TestCtxt = @mut TestCtxt {
6565
sess: sess,
6666
crate: crate,
67-
ext_cx: mk_ctxt(sess.parse_sess, copy sess.opts.cfg),
67+
ext_cx: ExtCtxt::new(sess.parse_sess, copy sess.opts.cfg),
6868
path: ~[],
6969
testfns: ~[]
7070
};

branches/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,6 +1834,10 @@ pub impl Resolver {
18341834
debug!("(building import directive) bumping \
18351835
reference");
18361836
resolution.outstanding_references += 1;
1837+
1838+
// the source of this name is different now
1839+
resolution.privacy = privacy;
1840+
resolution.id = id;
18371841
}
18381842
None => {
18391843
debug!("(building import directive) creating new");

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn doc_metas(
2626
attrs: ~[ast::attribute]
2727
) -> ~[@ast::meta_item] {
2828

29-
let doc_attrs = attr::find_attrs_by_name(attrs, "doc");
29+
let doc_attrs = attr::find_attrs_by_name(attrs, ~"doc");
3030
let doc_metas = do doc_attrs.map |attr| {
3131
attr::attr_meta(attr::desugar_doc_attr(attr))
3232
};
@@ -36,7 +36,7 @@ fn doc_metas(
3636

3737
pub fn parse_crate(attrs: ~[ast::attribute]) -> CrateAttrs {
3838
let link_metas = attr::find_linkage_metas(attrs);
39-
let name = attr::last_meta_item_value_str_by_name(link_metas, "name");
39+
let name = attr::last_meta_item_value_str_by_name(link_metas, ~"name");
4040

4141
CrateAttrs {
4242
name: name.map(|s| copy **s)
@@ -58,7 +58,7 @@ pub fn parse_hidden(attrs: ~[ast::attribute]) -> bool {
5858
do doc_metas(attrs).find |meta| {
5959
match attr::get_meta_item_list(*meta) {
6060
Some(metas) => {
61-
let hiddens = attr::find_meta_items_by_name(metas, "hidden");
61+
let hiddens = attr::find_meta_items_by_name(metas, ~"hidden");
6262
!hiddens.is_empty()
6363
}
6464
None => false

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ fn opts() -> ~[(getopts::Opt, ~str)] {
7070
pub fn usage() {
7171
use core::io::println;
7272

73-
println("Usage: rustdoc [options] <cratefile>\n");
74-
println("Options:\n");
73+
println(~"Usage: rustdoc [options] <cratefile>\n");
74+
println(~"Options:\n");
7575
for opts().each |opt| {
7676
println(fmt!(" %s", opt.second()));
7777
}
78-
println("");
78+
println(~"");
7979
}
8080

8181
pub fn default_config(input_crate: &Path) -> Config {
@@ -227,7 +227,7 @@ pub fn maybe_find_pandoc(
227227
};
228228

229229
let pandoc = do vec::find(possible_pandocs) |pandoc| {
230-
let output = program_output(*pandoc, [~"--version"]);
230+
let output = program_output(*pandoc, ~[~"--version"]);
231231
debug!("testing pandoc cmd %s: %?", *pandoc, output);
232232
output.status == 0
233233
};

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn first_sentence(s: ~str) -> Option<~str> {
104104
let paras = paragraphs(s);
105105
if !paras.is_empty() {
106106
let first_para = paras.head();
107-
Some(str::replace(first_sentence_(*first_para), "\n", " "))
107+
Some(str::replace(first_sentence_(*first_para), ~"\n", ~" "))
108108
} else {
109109
None
110110
}
@@ -132,7 +132,7 @@ fn first_sentence_(s: &str) -> ~str {
132132
str::to_owned(str::slice(s, 0, idx - 1))
133133
}
134134
_ => {
135-
if str::ends_with(s, ".") {
135+
if str::ends_with(s, ~".") {
136136
str::to_owned(s)
137137
} else {
138138
str::to_owned(s)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn mk_pass() -> Pass {
2020
}
2121

2222
fn escape(s: &str) -> ~str {
23-
str::replace(s, "\\", "\\\\")
23+
str::replace(s, ~"\\", ~"\\\\")
2424
}
2525

2626
#[test]

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,33 +124,33 @@ pub fn pandoc_header_id(header: &str) -> ~str {
124124
return header;
125125
126126
fn remove_formatting(s: &str) -> ~str {
127-
str::replace(s, "`", "")
127+
str::replace(s, ~"`", ~"")
128128
}
129129
fn remove_punctuation(s: &str) -> ~str {
130-
let s = str::replace(s, "<", "");
131-
let s = str::replace(s, ">", "");
132-
let s = str::replace(s, "[", "");
133-
let s = str::replace(s, "]", "");
134-
let s = str::replace(s, "(", "");
135-
let s = str::replace(s, ")", "");
136-
let s = str::replace(s, "@~", "");
137-
let s = str::replace(s, "~", "");
138-
let s = str::replace(s, "/", "");
139-
let s = str::replace(s, ":", "");
140-
let s = str::replace(s, "&", "");
141-
let s = str::replace(s, "^", "");
142-
let s = str::replace(s, ",", "");
143-
let s = str::replace(s, "'", "");
144-
let s = str::replace(s, "+", "");
130+
let s = str::replace(s, ~"<", ~"");
131+
let s = str::replace(s, ~">", ~"");
132+
let s = str::replace(s, ~"[", ~"");
133+
let s = str::replace(s, ~"]", ~"");
134+
let s = str::replace(s, ~"(", ~"");
135+
let s = str::replace(s, ~")", ~"");
136+
let s = str::replace(s, ~"@~", ~"");
137+
let s = str::replace(s, ~"~", ~"");
138+
let s = str::replace(s, ~"/", ~"");
139+
let s = str::replace(s, ~":", ~"");
140+
let s = str::replace(s, ~"&", ~"");
141+
let s = str::replace(s, ~"^", ~"");
142+
let s = str::replace(s, ~",", ~"");
143+
let s = str::replace(s, ~"'", ~"");
144+
let s = str::replace(s, ~"+", ~"");
145145
return s;
146146
}
147147
fn replace_with_hyphens(s: &str) -> ~str {
148148
// Collapse sequences of whitespace to a single dash
149149
// XXX: Hacky implementation here that only covers
150150
// one or two spaces.
151151
let s = str::trim(s);
152-
let s = str::replace(s, " ", "-");
153-
let s = str::replace(s, " ", "-");
152+
let s = str::replace(s, ~" ", ~"-");
153+
let s = str::replace(s, ~" ", ~"-");
154154
return s;
155155
}
156156
// FIXME: #4318 Instead of to_ascii and to_str_ascii, could use

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ fn make_title(page: doc::Page) -> ~str {
110110
}
111111
};
112112
let title = markdown_pass::header_text(item);
113-
let title = str::replace(title, "`", "");
113+
let title = str::replace(title, ~"`", ~"");
114114
return title;
115115
}
116116

@@ -169,7 +169,7 @@ pub fn header_kind(doc: doc::ItemTag) -> ~str {
169169
}
170170

171171
pub fn header_name(doc: doc::ItemTag) -> ~str {
172-
let fullpath = str::connect(doc.path() + ~[doc.name()], "::");
172+
let fullpath = str::connect(doc.path() + ~[doc.name()], ~"::");
173173
match &doc {
174174
&doc::ModTag(_) if doc.id() != syntax::ast::crate_node_id => {
175175
fullpath
@@ -471,7 +471,7 @@ fn write_methods(ctxt: &Ctxt, docs: &[doc::MethodDoc]) {
471471
}
472472

473473
fn write_method(ctxt: &Ctxt, doc: doc::MethodDoc) {
474-
write_header_(ctxt, H3, header_text_("Method", doc.name));
474+
write_header_(ctxt, H3, header_text_(~"Method", doc.name));
475475
write_fnlike(
476476
ctxt,
477477
copy doc.sig,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fn pandoc_writer(
101101
use core::io::WriterUtil;
102102
103103
debug!("pandoc cmd: %s", pandoc_cmd);
104-
debug!("pandoc args: %s", str::connect(pandoc_args, " "));
104+
debug!("pandoc args: %s", str::connect(pandoc_args, ~" "));
105105
106106
let pipe_in = os::pipe();
107107
let pipe_out = os::pipe();
@@ -198,7 +198,7 @@ pub fn make_filename(
198198
}
199199
}
200200
doc::ItemPage(doc) => {
201-
str::connect(doc.path() + ~[doc.name()], "_")
201+
str::connect(doc.path() + ~[doc.name()], ~"_")
202202
}
203203
}
204204
};
@@ -213,7 +213,7 @@ pub fn make_filename(
213213
fn write_file(path: &Path, s: ~str) {
214214
use core::io::WriterUtil;
215215
216-
match io::file_writer(path, [io::Create, io::Truncate]) {
216+
match io::file_writer(path, ~[io::Create, io::Truncate]) {
217217
result::Ok(writer) => {
218218
writer.write_str(s);
219219
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn sectionalize(desc: Option<~str>) -> (Option<~str>, ~[doc::Section]) {
149149
}
150150

151151
fn parse_header(line: ~str) -> Option<~str> {
152-
if str::starts_with(line, "# ") {
152+
if str::starts_with(line, ~"# ") {
153153
Some(str::slice(line, 2u, str::len(line)).to_owned())
154154
} else {
155155
None

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn unindent(s: &str) -> ~str {
8282
str::slice(*line, min_indent, str::len(*line)).to_owned()
8383
}
8484
};
85-
str::connect(unindented, "\n")
85+
str::connect(unindented, ~"\n")
8686
} else {
8787
s.to_str()
8888
}

0 commit comments

Comments
 (0)