Skip to content

Commit 9f2795b

Browse files
committed
---
yaml --- r: 82693 b: refs/heads/auto c: 88272a4 h: refs/heads/master i: 82691: e0e21f7 v: v3
1 parent cbc2609 commit 9f2795b

File tree

28 files changed

+578
-828
lines changed

28 files changed

+578
-828
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 2835df2db65b1c03f3f21f553b8f31db0fb1b6c0
16+
refs/heads/auto: 88272a4f2421fdf095ee3573517ce6d9f654fedc
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*.cpp rust
55
*.h rust
66
*.rs rust
7-
src/etc/pkg/rust-logo.ico binary
87
src/rt/msvc/* -whitespace
98
src/rt/vg/* -whitespace
109
src/rt/linenoise/* -whitespace

branches/auto/Makefile.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,6 @@ config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
608608
# Primary-target makefiles
609609
######################################################################
610610

611-
# Issue #9531: If you change the order of any of the following (or add
612-
# new definitions), make sure definitions always precede their uses,
613-
# especially for the dependency lists of recipes.
614-
615611
include $(CFG_SRC_DIR)mk/target.mk
616612
include $(CFG_SRC_DIR)mk/host.mk
617613
include $(CFG_SRC_DIR)mk/stage0.mk

branches/auto/RELEASES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Version 0.8 (September 2013)
1+
Version 0.8 (October 2013)
22
--------------------------
33

4-
* ~2200 changes, numerous bugfixes
4+
* ~2100 changes, numerous bugfixes
55

66
* Language
77
* The `for` loop syntax has changed to work with the `Iterator` trait.

branches/auto/mk/stage0.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/:
66
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/:
77
mkdir -p $@
88

9+
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE))
10+
911
$(SNAPSHOT_RUSTC_POST_CLEANUP): \
1012
$(S)src/snapshots.txt \
1113
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS) \

branches/auto/mk/target.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ WFLAGS_ST2 = -D warnings
3636
# had its chance to clean it out; otherwise the other products will be
3737
# inadvertantly included in the clean out.
3838

39-
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE))
40-
4139
define TARGET_STAGE_N
4240

4341
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \
-2 Bytes
Binary file not shown.

branches/auto/src/libextra/bitv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ impl Bitv {
523523
* with the most significant bits of each byte coming first. Each
524524
* bit becomes true if equal to 1 or false if equal to 0.
525525
*/
526-
pub fn from_bytes(bytes: &[u8]) -> Bitv {
526+
pub fn from_utf8(bytes: &[u8]) -> Bitv {
527527
from_fn(bytes.len() * 8, |i| {
528528
let b = bytes[i / 8] as uint;
529529
let offset = i % 8;
@@ -1275,8 +1275,8 @@ mod tests {
12751275
}
12761276
12771277
#[test]
1278-
fn test_from_bytes() {
1279-
let bitv = from_bytes([0b10110110, 0b00000000, 0b11111111]);
1278+
fn test_from_utf8() {
1279+
let bitv = from_utf8([0b10110110, 0b00000000, 0b11111111]);
12801280
let str = ~"10110110" + "00000000" + "11111111";
12811281
assert_eq!(bitv.to_str(), str);
12821282
}
@@ -1302,7 +1302,7 @@ mod tests {
13021302
#[test]
13031303
fn test_to_bools() {
13041304
let bools = ~[false, false, true, false, false, true, true, false];
1305-
assert_eq!(from_bytes([0b00100110]).to_bools(), bools);
1305+
assert_eq!(from_utf8([0b00100110]).to_bools(), bools);
13061306
}
13071307
13081308
#[test]

branches/auto/src/libextra/crypto/md5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static C4: [u32, ..16] = [
156156

157157

158158
/// The MD5 Digest algorithm
159-
pub struct Md5 {
159+
struct Md5 {
160160
priv length_bytes: u64,
161161
priv buffer: FixedBuffer64,
162162
priv state: Md5State,

branches/auto/src/libextra/crypto/sha2.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ impl Engine512 {
230230
}
231231

232232

233-
/// The SHA-512 hash algorithm
234-
pub struct Sha512 {
233+
struct Sha512 {
235234
priv engine: Engine512
236235
}
237236

@@ -283,8 +282,7 @@ static H512: [u64, ..8] = [
283282
];
284283

285284

286-
/// The SHA-384 hash algorithm
287-
pub struct Sha384 {
285+
struct Sha384 {
288286
priv engine: Engine512
289287
}
290288

@@ -334,8 +332,7 @@ static H384: [u64, ..8] = [
334332
];
335333

336334

337-
/// The SHA-512 hash algorithm with digest truncated to 256 bits
338-
pub struct Sha512Trunc256 {
335+
struct Sha512Trunc256 {
339336
priv engine: Engine512
340337
}
341338

@@ -383,8 +380,7 @@ static H512_TRUNC_256: [u64, ..8] = [
383380
];
384381

385382

386-
/// The SHA-512 hash algorithm with digest truncated to 224 bits
387-
pub struct Sha512Trunc224 {
383+
struct Sha512Trunc224 {
388384
priv engine: Engine512
389385
}
390386

@@ -639,8 +635,7 @@ impl Engine256 {
639635
}
640636

641637

642-
/// The SHA-256 hash algorithm
643-
pub struct Sha256 {
638+
struct Sha256 {
644639
priv engine: Engine256
645640
}
646641

@@ -692,8 +687,7 @@ static H256: [u32, ..8] = [
692687
];
693688

694689

695-
/// The SHA-224 hash algorithm
696-
pub struct Sha224 {
690+
struct Sha224 {
697691
priv engine: Engine256
698692
}
699693

branches/auto/src/libextra/url.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use std::to_bytes;
2121
use std::uint;
2222

2323
#[deriving(Clone, Eq)]
24-
pub struct Url {
24+
struct Url {
2525
scheme: ~str,
2626
user: Option<UserInfo>,
2727
host: ~str,
@@ -32,7 +32,7 @@ pub struct Url {
3232
}
3333

3434
#[deriving(Clone, Eq)]
35-
pub struct UserInfo {
35+
struct UserInfo {
3636
user: ~str,
3737
pass: Option<~str>
3838
}

branches/auto/src/librustc/metadata/decoder.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -564,19 +564,19 @@ impl<'self> EachItemContext<'self> {
564564
}
565565
}
566566

567-
let mut continue = (self.callback)(*self.path_builder, def_like, vis);
567+
let mut continue_ = (self.callback)(*self.path_builder, def_like, vis);
568568

569569
let family = item_family(doc);
570570
if family == ForeignMod {
571571
// These are unnamed; pop the name now.
572572
self.pop_name(old_len)
573573
}
574574

575-
if continue {
575+
if continue_ {
576576
// Recurse if necessary.
577577
match family {
578578
Mod | ForeignMod | Trait | Impl => {
579-
continue = self.each_item_of_module(def_id);
579+
continue_ = self.each_item_of_module(def_id);
580580
}
581581
ImmStatic | MutStatic | Struct | UnsafeFn | Fn | ForeignFn |
582582
UnsafeStaticMethod | StaticMethod | Type | ForeignType |
@@ -589,7 +589,7 @@ impl<'self> EachItemContext<'self> {
589589
self.pop_name(old_len)
590590
}
591591

592-
continue
592+
continue_
593593
}
594594

595595
fn each_item_of_module(&mut self, def_id: ast::DefId) -> bool {
@@ -612,7 +612,7 @@ impl<'self> EachItemContext<'self> {
612612
}
613613

614614
fn each_child_of_module_or_crate(&mut self, item_doc: ebml::Doc) -> bool {
615-
let mut continue = true;
615+
let mut continue_ = true;
616616

617617
// Iterate over all children.
618618
do reader::tagged_docs(item_doc, tag_mod_child) |child_info_doc| {
@@ -654,16 +654,16 @@ impl<'self> EachItemContext<'self> {
654654
// Process this item.
655655

656656
let vis = item_visibility(child_item_doc);
657-
continue = self.process_item_and_pop_name(child_item_doc,
657+
continue_ = self.process_item_and_pop_name(child_item_doc,
658658
child_def_id,
659659
old_len,
660660
vis);
661661
}
662662
}
663-
continue
663+
continue_
664664
};
665665

666-
if !continue {
666+
if !continue_ {
667667
return false
668668
}
669669

@@ -705,18 +705,18 @@ impl<'self> EachItemContext<'self> {
705705
match maybe_find_item(def_id.node, other_crates_items) {
706706
None => { self.pop_name(old_len); }
707707
Some(reexported_item_doc) => {
708-
continue = self.process_item_and_pop_name(
708+
continue_ = self.process_item_and_pop_name(
709709
reexported_item_doc,
710710
def_id,
711711
old_len,
712712
ast::public);
713713
}
714714
}
715715

716-
continue
716+
continue_
717717
};
718718

719-
continue
719+
continue_
720720
}
721721
}
722722

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,12 @@ fn encode_reexported_static_methods(ecx: &EncodeContext,
521521
/// * For newtype structs, iterates through the node ID of the constructor.
522522
fn each_auxiliary_node_id(item: @item, callback: &fn(NodeId) -> bool)
523523
-> bool {
524-
let mut continue = true;
524+
let mut continue_ = true;
525525
match item.node {
526526
item_enum(ref enum_def, _) => {
527527
for variant in enum_def.variants.iter() {
528-
continue = callback(variant.node.id);
529-
if !continue {
528+
continue_ = callback(variant.node.id);
529+
if !continue_ {
530530
break
531531
}
532532
}
@@ -537,15 +537,15 @@ fn each_auxiliary_node_id(item: @item, callback: &fn(NodeId) -> bool)
537537
Some(ctor_id) if struct_def.fields.len() > 0 &&
538538
struct_def.fields[0].node.kind ==
539539
ast::unnamed_field => {
540-
continue = callback(ctor_id);
540+
continue_ = callback(ctor_id);
541541
}
542542
_ => {}
543543
}
544544
}
545545
_ => {}
546546
}
547547

548-
continue
548+
continue_
549549
}
550550

551551
fn encode_reexports(ecx: &EncodeContext,

branches/auto/src/librustc/middle/typeck/check/method.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ impl<'self> LookupContext<'self> {
372372
// to a trait and its supertraits.
373373
fn get_method_index(&self,
374374
trait_ref: @TraitRef,
375-
subtrait: @TraitRef,
375+
subtrait_id: ast::DefId,
376376
n_method: uint) -> uint {
377377
let tcx = self.tcx();
378378

@@ -382,14 +382,15 @@ impl<'self> LookupContext<'self> {
382382
// we find the trait the method came from, counting up the
383383
// methods from them.
384384
let mut method_count = 0;
385-
do ty::each_bound_trait_and_supertraits(tcx, &[subtrait])
385+
do ty::each_bound_trait_and_supertraits(tcx, &[trait_ref])
386386
|bound_ref| {
387-
if bound_ref.def_id == trait_ref.def_id { false }
387+
if bound_ref.def_id == subtrait_id { false }
388388
else {
389389
method_count += ty::trait_methods(tcx, bound_ref.def_id).len();
390390
true
391391
}
392392
};
393+
393394
return method_count + n_method;
394395
}
395396

@@ -417,9 +418,9 @@ impl<'self> LookupContext<'self> {
417418
let trait_ref = @TraitRef { def_id: did, substs: rcvr_substs.clone() };
418419

419420
do self.push_inherent_candidates_from_bounds_inner(&[trait_ref])
420-
|new_trait_ref, m, method_num, _bound_num| {
421+
|trait_ref, m, method_num, _bound_num| {
421422
let vtable_index =
422-
self.get_method_index(new_trait_ref, trait_ref, method_num);
423+
self.get_method_index(trait_ref, trait_ref.def_id, method_num);
423424
// We need to fix up the transformed self type.
424425
let transformed_self_ty =
425426
self.construct_transformed_self_ty_for_object(

branches/auto/src/libstd/libc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3224,14 +3224,14 @@ pub mod funcs {
32243224
#[nolink]
32253225
#[abi = "cdecl"]
32263226
pub mod glob {
3227+
use libc::types::common::c95::{c_void};
32273228
use libc::types::os::arch::c95::{c_char, c_int};
32283229
use libc::types::os::common::posix01::{glob_t};
3229-
use option::Option;
32303230

32313231
extern {
32323232
pub fn glob(pattern: *c_char,
32333233
flags: c_int,
3234-
errfunc: Option<extern "C" fn(epath: *c_char, errno: int) -> int>,
3234+
errfunc: *c_void, // XXX callback
32353235
pglob: *mut glob_t);
32363236
pub fn globfree(pglob: *mut glob_t);
32373237
}

branches/auto/src/libstd/result.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,19 @@ impl<T, E> either::AsEither<E, T> for Result<T, E> {
366366
}
367367
}
368368

369+
#[inline]
370+
#[allow(missing_doc)]
371+
pub fn map_opt<T, U: ToStr, V>(o_t: &Option<T>,
372+
op: &fn(&T) -> Result<V,U>) -> Result<Option<V>,U> {
373+
match *o_t {
374+
None => Ok(None),
375+
Some(ref t) => match op(t) {
376+
Ok(v) => Ok(Some(v)),
377+
Err(e) => Err(e)
378+
}
379+
}
380+
}
381+
369382
/// Takes each element in the iterator: if it is an error, no further
370383
/// elements are taken, and the error is returned.
371384
/// Should no error occur, a vector containing the values of each Result

branches/auto/src/libstd/rt/comm.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,6 @@ impl<T> ChanOne<T> {
118118
rtassert!(!rt::in_sched_context());
119119
}
120120

121-
// In order to prevent starvation of other tasks in situations
122-
// where a task sends repeatedly without ever receiving, we
123-
// occassionally yield instead of doing a send immediately.
124-
// Only doing this if we're doing a rescheduling send,
125-
// otherwise the caller is expecting not to context switch.
126-
if do_resched {
127-
// XXX: This TLS hit should be combined with other uses of the scheduler below
128-
let sched: ~Scheduler = Local::take();
129-
sched.maybe_yield();
130-
}
131-
132121
let mut this = self;
133122
let mut recvr_active = true;
134123
let packet = this.packet();

0 commit comments

Comments
 (0)