Skip to content

Commit af89603

Browse files
committed
---
yaml --- r: 147316 b: refs/heads/try2 c: 09b8406 h: refs/heads/master v: v3
1 parent 3ca7a89 commit af89603

File tree

19 files changed

+52
-484
lines changed

19 files changed

+52
-484
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: eabf11b9cb1f1bddeb1208e5564e592d10e4b680
8+
refs/heads/try2: 09b8406638abca96fa6794b0263c1e7459234ecc
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ syn keyword rustEnumVariant Ok Err
6666

6767
" Types and traits {{{3
6868
syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
69-
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr ToBytesConsume
69+
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
7070
syn keyword rustTrait Bool
7171
syn keyword rustTrait ToCStr
7272
syn keyword rustTrait Char
@@ -94,7 +94,7 @@ syn keyword rustTrait Buffer Writer Reader Seek
9494
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9595
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9696
syn keyword rustTrait IterBytes
97-
syn keyword rustTrait ToStr ToStrConsume
97+
syn keyword rustTrait ToStr IntoStr
9898
syn keyword rustTrait CopyableTuple ImmutableTuple
9999
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
100100
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8

branches/try2/src/librustc/back/link.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -728,17 +728,10 @@ pub fn link_binary(sess: Session,
728728
obj_filename: &Path,
729729
out_filename: &Path,
730730
lm: &LinkMeta) -> ~[Path] {
731-
// If we're generating a test executable, then ignore all other output
732-
// styles at all other locations
733-
let outputs = if sess.opts.test {
734-
~[session::OutputExecutable]
735-
} else {
736-
(*sess.outputs).clone()
737-
};
738-
739731
let mut out_filenames = ~[];
740-
for output in outputs.move_iter() {
741-
let out_file = link_binary_output(sess, trans, output, obj_filename, out_filename, lm);
732+
for &output in sess.outputs.iter() {
733+
let out_file = link_binary_output(sess, trans, output, obj_filename,
734+
out_filename, lm);
742735
out_filenames.push(out_file);
743736
}
744737

branches/try2/src/librustc/driver/session.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,20 +405,25 @@ pub fn expect<T:Clone>(sess: Session, opt: Option<T>, msg: || -> ~str) -> T {
405405
}
406406

407407
pub fn building_library(options: &options, crate: &ast::Crate) -> bool {
408+
if options.test { return false }
408409
for output in options.outputs.iter() {
409410
match *output {
410411
OutputExecutable => {}
411412
OutputStaticlib | OutputDylib | OutputRlib => return true
412413
}
413414
}
414-
if options.test { return false }
415415
match syntax::attr::first_attr_value_str_by_name(crate.attrs, "crate_type") {
416416
Some(s) => "lib" == s || "rlib" == s || "dylib" == s || "staticlib" == s,
417417
_ => false
418418
}
419419
}
420420

421421
pub fn collect_outputs(options: &options, crate: &ast::Crate) -> ~[OutputStyle] {
422+
// If we're generating a test executable, then ignore all other output
423+
// styles at all other locations
424+
if options.test {
425+
return ~[OutputExecutable];
426+
}
422427
let mut base = options.outputs.clone();
423428
let mut iter = crate.attrs.iter().filter_map(|a| {
424429
if "crate_type" == a.name() {

branches/try2/src/librustc/middle/dead.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,9 @@ impl Visitor<()> for MarkSymbolVisitor {
158158
visit::walk_expr(self, expr, ())
159159
}
160160

161-
fn visit_ty(&mut self, typ: &ast::Ty, _: ()) {
162-
match typ.node {
163-
ast::ty_path(_, _, ref id) => {
164-
self.lookup_and_handle_definition(id);
165-
}
166-
_ => visit::walk_ty(self, typ, ()),
167-
}
168-
}
169-
170-
fn visit_path(&mut self, _: &ast::Path, id: ast::NodeId, _: ()) {
161+
fn visit_path(&mut self, path: &ast::Path, id: ast::NodeId, _: ()) {
171162
self.lookup_and_handle_definition(&id);
163+
visit::walk_path(self, path, ());
172164
}
173165

174166
fn visit_item(&mut self, _item: @ast::item, _: ()) {

branches/try2/src/librustdoc/html/render.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,13 @@ impl Context {
648648
self.root_path.push_str("../");
649649
self.current.push(s);
650650

651+
info!("Recursing into {}", self.dst.display());
652+
651653
mkdir(&self.dst);
652654
let ret = f(self);
653655

656+
info!("Recursed; leaving {}", self.dst.display());
657+
654658
// Go back to where we were at
655659
self.dst = prev;
656660
let len = self.root_path.len();
@@ -674,23 +678,18 @@ impl Context {
674678
// using a rwarc makes this parallelizable in the future
675679
local_data::set(cache_key, Arc::new(cache));
676680

677-
let mut work = ~[item];
678-
while work.len() > 0 {
679-
let item = work.pop();
680-
self.item(item, |_cx, item| {
681-
work.push(item);
682-
})
683-
}
681+
self.item(item);
684682
}
685683

686684
/// Non-parellelized version of rendering an item. This will take the input
687685
/// item, render its contents, and then invoke the specified closure with
688686
/// all sub-items which need to be rendered.
689687
///
690688
/// The rendering driver uses this closure to queue up more work.
691-
fn item(&mut self, item: clean::Item, f: |&mut Context, clean::Item|) {
689+
fn item(&mut self, item: clean::Item) {
692690
fn render(w: io::File, cx: &mut Context, it: &clean::Item,
693691
pushname: bool) {
692+
info!("Rendering an item to {}", w.path().display());
694693
// A little unfortunate that this is done like this, but it sure
695694
// does make formatting *a lot* nicer.
696695
local_data::set(current_location_key, cx.current.clone());
@@ -734,7 +733,7 @@ impl Context {
734733
};
735734
this.sidebar = build_sidebar(&m);
736735
for item in m.items.move_iter() {
737-
f(this, item);
736+
this.item(item);
738737
}
739738
})
740739
}

branches/try2/src/librustuv/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ pub fn uv_error_to_io_error(uverr: UvError) -> IoError {
337337
EACCES => PermissionDenied,
338338
ECONNREFUSED => ConnectionRefused,
339339
ECONNRESET => ConnectionReset,
340+
ENOENT => FileNotFound,
340341
ENOTCONN => NotConnected,
341342
EPIPE => BrokenPipe,
342343
ECONNABORTED => ConnectionAborted,

branches/try2/src/librustuv/uvll.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub static EOF: c_int = -4095;
4444
pub static UNKNOWN: c_int = -4094;
4545

4646
// uv-errno.h redefines error codes for windows, but not for unix...
47+
// https://github.com/joyent/libuv/blob/master/include/uv-errno.h
4748

4849
#[cfg(windows)]
4950
pub mod errors {
@@ -52,6 +53,7 @@ pub mod errors {
5253
pub static EACCES: c_int = -4092;
5354
pub static ECONNREFUSED: c_int = -4078;
5455
pub static ECONNRESET: c_int = -4077;
56+
pub static ENOENT: c_int = -4058;
5557
pub static ENOTCONN: c_int = -4053;
5658
pub static EPIPE: c_int = -4047;
5759
pub static ECONNABORTED: c_int = -4079;
@@ -66,6 +68,7 @@ pub mod errors {
6668
pub static EACCES: c_int = -libc::EACCES;
6769
pub static ECONNREFUSED: c_int = -libc::ECONNREFUSED;
6870
pub static ECONNRESET: c_int = -libc::ECONNRESET;
71+
pub static ENOENT: c_int = -libc::ENOENT;
6972
pub static ENOTCONN: c_int = -libc::ENOTCONN;
7073
pub static EPIPE: c_int = -libc::EPIPE;
7174
pub static ECONNABORTED: c_int = -libc::ECONNABORTED;

branches/try2/src/libstd/ascii.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Operations on ASCII strings and characters.
1212
13-
use to_str::{ToStr,ToStrConsume};
13+
use to_str::{ToStr,IntoStr};
1414
use str;
1515
use str::StrSlice;
1616
use str::OwnedStr;
@@ -294,7 +294,7 @@ impl<'a> AsciiStr for &'a [Ascii] {
294294
}
295295
}
296296

297-
impl ToStrConsume for ~[Ascii] {
297+
impl IntoStr for ~[Ascii] {
298298
#[inline]
299299
fn into_str(self) -> ~str {
300300
unsafe { cast::transmute(self) }
@@ -309,12 +309,12 @@ impl IterBytes for Ascii {
309309
}
310310

311311
/// Trait to convert to a owned byte array by consuming self
312-
pub trait ToBytesConsume {
312+
pub trait IntoBytes {
313313
/// Converts to a owned byte array by consuming self
314314
fn into_bytes(self) -> ~[u8];
315315
}
316316

317-
impl ToBytesConsume for ~[Ascii] {
317+
impl IntoBytes for ~[Ascii] {
318318
fn into_bytes(self) -> ~[u8] {
319319
unsafe { cast::transmute(self) }
320320
}

0 commit comments

Comments
 (0)