Skip to content

Commit bedf586

Browse files
committed
---
yaml --- r: 73327 b: refs/heads/dist-snap c: eea265e h: refs/heads/master i: 73325: ac05202 73323: 79e8a16 73319: a41319c 73311: c0c6e4c v: v3
1 parent b46e045 commit bedf586

29 files changed

+270
-255
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: d4724c1a178252c240c9ad012fc3cba93f18babc
10+
refs/heads/dist-snap: eea265ea165cb0e6fa989a3712efd701456b265d
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/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
}

branches/dist-snap/src/librustpkg/rustpkg.rc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ impl<'self> PkgScript<'self> {
126126
&exe, @copy os::args()[0],
127127
driver::cu_everything);
128128
debug!("Running program: %s %s %s", exe.to_str(), root.to_str(), what);
129-
let status = run::run_program(exe.to_str(), [root.to_str(), what]);
129+
let status = run::run_program(exe.to_str(), ~[root.to_str(), what]);
130130
if status != 0 {
131131
return (~[], status);
132132
}
133133
else {
134134
debug!("Running program (configs): %s %s %s",
135-
exe.to_str(), root.to_str(), "configs");
136-
let output = run::program_output(exe.to_str(), [root.to_str(), ~"configs"]);
135+
exe.to_str(), root.to_str(), ~"configs");
136+
let output = run::program_output(exe.to_str(), ~[root.to_str(), ~"configs"]);
137137
// Run the configs() function to get the configs
138138
let mut cfgs = ~[];
139139
for str::each_word(output.out) |w| {
@@ -360,9 +360,9 @@ pub fn main() {
360360
io::println("WARNING: The Rust package manager is experimental and may be unstable");
361361

362362
let args = os::args();
363-
let opts = ~[getopts::optflag("h"), getopts::optflag("help"),
364-
getopts::optflag("j"), getopts::optflag("json"),
365-
getopts::optmulti("c"), getopts::optmulti("cfg")];
363+
let opts = ~[getopts::optflag(~"h"), getopts::optflag(~"help"),
364+
getopts::optflag(~"j"), getopts::optflag(~"json"),
365+
getopts::optmulti(~"c"), getopts::optmulti(~"cfg")];
366366
let matches = &match getopts::getopts(args, opts) {
367367
result::Ok(m) => m,
368368
result::Err(f) => {
@@ -371,10 +371,10 @@ pub fn main() {
371371
return;
372372
}
373373
};
374-
let help = getopts::opt_present(matches, "h") ||
375-
getopts::opt_present(matches, "help");
376-
let json = getopts::opt_present(matches, "j") ||
377-
getopts::opt_present(matches, "json");
374+
let help = getopts::opt_present(matches, ~"h") ||
375+
getopts::opt_present(matches, ~"help");
376+
let json = getopts::opt_present(matches, ~"j") ||
377+
getopts::opt_present(matches, ~"json");
378378
let mut args = copy matches.free;
379379

380380
args.shift();
@@ -428,7 +428,7 @@ pub impl Crate {
428428

429429
fn flag(&self, flag: ~str) -> Crate {
430430
Crate {
431-
flags: vec::append(copy self.flags, [flag]),
431+
flags: vec::append(copy self.flags, ~[flag]),
432432
.. copy *self
433433
}
434434
}
@@ -442,7 +442,7 @@ pub impl Crate {
442442

443443
fn cfg(&self, cfg: ~str) -> Crate {
444444
Crate {
445-
cfgs: vec::append(copy self.cfgs, [cfg]),
445+
cfgs: vec::append(copy self.cfgs, ~[cfg]),
446446
.. copy *self
447447
}
448448
}
@@ -546,7 +546,7 @@ impl PkgSrc {
546546
let url = fmt!("https://%s", self.id.remote_path.to_str());
547547
util::note(fmt!("git clone %s %s", url, local.to_str()));
548548

549-
if run::program_output("git", [~"clone", copy url, local.to_str()]).status != 0 {
549+
if run::program_output(~"git", ~[~"clone", copy url, local.to_str()]).status != 0 {
550550
util::note(fmt!("fetching %s failed: can't clone repository", url));
551551
return false;
552552
}

0 commit comments

Comments
 (0)