Skip to content

Commit 0cf5517

Browse files
committed
---
yaml --- r: 123836 b: refs/heads/auto c: b0b4b31 h: refs/heads/master v: v3
1 parent 5d27279 commit 0cf5517

File tree

40 files changed

+349
-359
lines changed

40 files changed

+349
-359
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: fbeee04f31ac16fe61f29749145a29e562d065fe
16+
refs/heads/auto: b0b4b3122a4af7bf9b361c8f646da4a120e7ba38
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcollections/treemap.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use core::iter::Peekable;
2222
use core::iter;
2323
use core::mem::{replace, swap};
2424
use core::ptr;
25-
use std::hash::{Writer, Hash};
2625

2726
use {Collection, Mutable, Set, MutableSet, MutableMap, Map};
2827
use vec::Vec;
@@ -1056,14 +1055,6 @@ impl<K: Ord, V> Extendable<(K, V)> for TreeMap<K, V> {
10561055
}
10571056
}
10581057

1059-
impl<S: Writer, K: Ord + Hash<S>, V: Hash<S>> Hash<S> for TreeMap<K, V> {
1060-
fn hash(&self, state: &mut S) {
1061-
for elt in self.iter() {
1062-
elt.hash(state);
1063-
}
1064-
}
1065-
}
1066-
10671058
impl<T: Ord> FromIterator<T> for TreeSet<T> {
10681059
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> TreeSet<T> {
10691060
let mut set = TreeSet::new();
@@ -1081,14 +1072,6 @@ impl<T: Ord> Extendable<T> for TreeSet<T> {
10811072
}
10821073
}
10831074

1084-
impl<S: Writer, T: Ord + Hash<S>> Hash<S> for TreeSet<T> {
1085-
fn hash(&self, state: &mut S) {
1086-
for elt in self.iter() {
1087-
elt.hash(state);
1088-
}
1089-
}
1090-
}
1091-
10921075
#[cfg(test)]
10931076
mod test_treemap {
10941077
use std::prelude::*;
@@ -1625,7 +1608,6 @@ mod bench {
16251608
#[cfg(test)]
16261609
mod test_set {
16271610
use std::prelude::*;
1628-
use std::hash;
16291611

16301612
use {Set, MutableSet, Mutable, MutableMap};
16311613
use super::{TreeMap, TreeSet};
@@ -1766,22 +1748,6 @@ mod test_set {
17661748
assert!(m.clone() == m);
17671749
}
17681750

1769-
#[test]
1770-
fn test_hash() {
1771-
let mut x = TreeSet::new();
1772-
let mut y = TreeSet::new();
1773-
1774-
x.insert(1i);
1775-
x.insert(2);
1776-
x.insert(3);
1777-
1778-
y.insert(3i);
1779-
y.insert(2);
1780-
y.insert(1);
1781-
1782-
assert!(hash::hash(&x) == hash::hash(&y));
1783-
}
1784-
17851751
fn check(a: &[int],
17861752
b: &[int],
17871753
expected: &[int],

branches/auto/src/libcore/iter.rs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ the rest of the rust manuals.
6464
6565
*/
6666

67-
use clone::Clone;
6867
use cmp;
69-
use cmp::{PartialEq, PartialOrd, Ord};
70-
use mem;
7168
use num::{Zero, One, CheckedAdd, CheckedSub, Saturating, ToPrimitive, Int};
72-
use ops::{Add, Mul, Sub};
7369
use option::{Option, Some, None};
70+
use ops::{Add, Mul, Sub};
71+
use cmp::{PartialEq, PartialOrd, Ord};
72+
use clone::Clone;
7473
use uint;
74+
use mem;
7575

7676
/// Conversion from an `Iterator`
7777
pub trait FromIterator<A> {
@@ -2192,27 +2192,6 @@ impl<A: Clone> RandomAccessIterator<A> for Repeat<A> {
21922192
fn idx(&mut self, _: uint) -> Option<A> { Some(self.element.clone()) }
21932193
}
21942194

2195-
type IterateState<'a, T> = (|T|: 'a -> T, Option<T>, bool);
2196-
2197-
/// An iterator that repeatedly applies a given function, starting
2198-
/// from a given seed value.
2199-
pub type Iterate<'a, T> = Unfold<'a, T, IterateState<'a, T>>;
2200-
2201-
/// Creates a new iterator that produces an infinite sequence of
2202-
/// repeated applications of the given function `f`.
2203-
#[allow(visible_private_types)]
2204-
pub fn iterate<'a, T: Clone>(f: |T|: 'a -> T, seed: T) -> Iterate<'a, T> {
2205-
Unfold::new((f, Some(seed), true), |st| {
2206-
let &(ref mut f, ref mut val, ref mut first) = st;
2207-
if *first {
2208-
*first = false;
2209-
} else {
2210-
val.mutate(|x| (*f)(x));
2211-
}
2212-
val.clone()
2213-
})
2214-
}
2215-
22162195
/// Functions for lexicographical ordering of sequences.
22172196
///
22182197
/// Lexicographical ordering through `<`, `<=`, `>=`, `>` requires

branches/auto/src/libcoretest/iter.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,3 @@ fn test_min_max_result() {
833833
let r = MinMax(1i,2);
834834
assert_eq!(r.into_option(), Some((1,2)));
835835
}
836-
837-
#[test]
838-
fn test_iterate() {
839-
let mut it = iterate(|x| x * 2, 1u);
840-
assert_eq!(it.next(), Some(1u));
841-
assert_eq!(it.next(), Some(2u));
842-
assert_eq!(it.next(), Some(4u));
843-
assert_eq!(it.next(), Some(8u));
844-
}

branches/auto/src/liblibc/lib.rs

Lines changed: 57 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,6 @@ pub mod consts {
20082008
pub mod posix88 {
20092009
use types::os::arch::c95::c_int;
20102010
use types::common::c95::c_void;
2011-
use types::os::arch::posix88::mode_t;
20122011

20132012
pub static O_RDONLY : c_int = 0;
20142013
pub static O_WRONLY : c_int = 1;
@@ -2017,20 +2016,20 @@ pub mod consts {
20172016
pub static O_CREAT : c_int = 64;
20182017
pub static O_EXCL : c_int = 128;
20192018
pub static O_TRUNC : c_int = 512;
2020-
pub static S_IFIFO : mode_t = 4096;
2021-
pub static S_IFCHR : mode_t = 8192;
2022-
pub static S_IFBLK : mode_t = 24576;
2023-
pub static S_IFDIR : mode_t = 16384;
2024-
pub static S_IFREG : mode_t = 32768;
2025-
pub static S_IFLNK : mode_t = 40960;
2026-
pub static S_IFMT : mode_t = 61440;
2027-
pub static S_IEXEC : mode_t = 64;
2028-
pub static S_IWRITE : mode_t = 128;
2029-
pub static S_IREAD : mode_t = 256;
2030-
pub static S_IRWXU : mode_t = 448;
2031-
pub static S_IXUSR : mode_t = 64;
2032-
pub static S_IWUSR : mode_t = 128;
2033-
pub static S_IRUSR : mode_t = 256;
2019+
pub static S_IFIFO : c_int = 4096;
2020+
pub static S_IFCHR : c_int = 8192;
2021+
pub static S_IFBLK : c_int = 24576;
2022+
pub static S_IFDIR : c_int = 16384;
2023+
pub static S_IFREG : c_int = 32768;
2024+
pub static S_IFLNK : c_int = 40960;
2025+
pub static S_IFMT : c_int = 61440;
2026+
pub static S_IEXEC : c_int = 64;
2027+
pub static S_IWRITE : c_int = 128;
2028+
pub static S_IREAD : c_int = 256;
2029+
pub static S_IRWXU : c_int = 448;
2030+
pub static S_IXUSR : c_int = 64;
2031+
pub static S_IWUSR : c_int = 128;
2032+
pub static S_IRUSR : c_int = 256;
20342033
pub static F_OK : c_int = 0;
20352034
pub static R_OK : c_int = 4;
20362035
pub static W_OK : c_int = 2;
@@ -2221,7 +2220,6 @@ pub mod consts {
22212220
pub mod posix88 {
22222221
use types::os::arch::c95::c_int;
22232222
use types::common::c95::c_void;
2224-
use types::os::arch::posix88::mode_t;
22252223

22262224
pub static O_RDONLY : c_int = 0;
22272225
pub static O_WRONLY : c_int = 1;
@@ -2230,20 +2228,20 @@ pub mod consts {
22302228
pub static O_CREAT : c_int = 256;
22312229
pub static O_EXCL : c_int = 1024;
22322230
pub static O_TRUNC : c_int = 512;
2233-
pub static S_IFIFO : mode_t = 4096;
2234-
pub static S_IFCHR : mode_t = 8192;
2235-
pub static S_IFBLK : mode_t = 24576;
2236-
pub static S_IFDIR : mode_t = 16384;
2237-
pub static S_IFREG : mode_t = 32768;
2238-
pub static S_IFLNK : mode_t = 40960;
2239-
pub static S_IFMT : mode_t = 61440;
2240-
pub static S_IEXEC : mode_t = 64;
2241-
pub static S_IWRITE : mode_t = 128;
2242-
pub static S_IREAD : mode_t = 256;
2243-
pub static S_IRWXU : mode_t = 448;
2244-
pub static S_IXUSR : mode_t = 64;
2245-
pub static S_IWUSR : mode_t = 128;
2246-
pub static S_IRUSR : mode_t = 256;
2231+
pub static S_IFIFO : c_int = 4096;
2232+
pub static S_IFCHR : c_int = 8192;
2233+
pub static S_IFBLK : c_int = 24576;
2234+
pub static S_IFDIR : c_int = 16384;
2235+
pub static S_IFREG : c_int = 32768;
2236+
pub static S_IFLNK : c_int = 40960;
2237+
pub static S_IFMT : c_int = 61440;
2238+
pub static S_IEXEC : c_int = 64;
2239+
pub static S_IWRITE : c_int = 128;
2240+
pub static S_IREAD : c_int = 256;
2241+
pub static S_IRWXU : c_int = 448;
2242+
pub static S_IXUSR : c_int = 64;
2243+
pub static S_IWUSR : c_int = 128;
2244+
pub static S_IRUSR : c_int = 256;
22472245
pub static F_OK : c_int = 0;
22482246
pub static R_OK : c_int = 4;
22492247
pub static W_OK : c_int = 2;
@@ -2761,7 +2759,6 @@ pub mod consts {
27612759
pub mod posix88 {
27622760
use types::common::c95::c_void;
27632761
use types::os::arch::c95::c_int;
2764-
use types::os::arch::posix88::mode_t;
27652762

27662763
pub static O_RDONLY : c_int = 0;
27672764
pub static O_WRONLY : c_int = 1;
@@ -2770,20 +2767,20 @@ pub mod consts {
27702767
pub static O_CREAT : c_int = 512;
27712768
pub static O_EXCL : c_int = 2048;
27722769
pub static O_TRUNC : c_int = 1024;
2773-
pub static S_IFIFO : mode_t = 4096;
2774-
pub static S_IFCHR : mode_t = 8192;
2775-
pub static S_IFBLK : mode_t = 24576;
2776-
pub static S_IFDIR : mode_t = 16384;
2777-
pub static S_IFREG : mode_t = 32768;
2778-
pub static S_IFLNK : mode_t = 40960;
2779-
pub static S_IFMT : mode_t = 61440;
2780-
pub static S_IEXEC : mode_t = 64;
2781-
pub static S_IWRITE : mode_t = 128;
2782-
pub static S_IREAD : mode_t = 256;
2783-
pub static S_IRWXU : mode_t = 448;
2784-
pub static S_IXUSR : mode_t = 64;
2785-
pub static S_IWUSR : mode_t = 128;
2786-
pub static S_IRUSR : mode_t = 256;
2770+
pub static S_IFIFO : c_int = 4096;
2771+
pub static S_IFCHR : c_int = 8192;
2772+
pub static S_IFBLK : c_int = 24576;
2773+
pub static S_IFDIR : c_int = 16384;
2774+
pub static S_IFREG : c_int = 32768;
2775+
pub static S_IFLNK : c_int = 40960;
2776+
pub static S_IFMT : c_int = 61440;
2777+
pub static S_IEXEC : c_int = 64;
2778+
pub static S_IWRITE : c_int = 128;
2779+
pub static S_IREAD : c_int = 256;
2780+
pub static S_IRWXU : c_int = 448;
2781+
pub static S_IXUSR : c_int = 64;
2782+
pub static S_IWUSR : c_int = 128;
2783+
pub static S_IRUSR : c_int = 256;
27872784
pub static F_OK : c_int = 0;
27882785
pub static R_OK : c_int = 4;
27892786
pub static W_OK : c_int = 2;
@@ -3151,7 +3148,6 @@ pub mod consts {
31513148
pub mod posix88 {
31523149
use types::common::c95::c_void;
31533150
use types::os::arch::c95::c_int;
3154-
use types::os::arch::posix88::mode_t;
31553151

31563152
pub static O_RDONLY : c_int = 0;
31573153
pub static O_WRONLY : c_int = 1;
@@ -3160,20 +3156,20 @@ pub mod consts {
31603156
pub static O_CREAT : c_int = 512;
31613157
pub static O_EXCL : c_int = 2048;
31623158
pub static O_TRUNC : c_int = 1024;
3163-
pub static S_IFIFO : mode_t = 4096;
3164-
pub static S_IFCHR : mode_t = 8192;
3165-
pub static S_IFBLK : mode_t = 24576;
3166-
pub static S_IFDIR : mode_t = 16384;
3167-
pub static S_IFREG : mode_t = 32768;
3168-
pub static S_IFLNK : mode_t = 40960;
3169-
pub static S_IFMT : mode_t = 61440;
3170-
pub static S_IEXEC : mode_t = 64;
3171-
pub static S_IWRITE : mode_t = 128;
3172-
pub static S_IREAD : mode_t = 256;
3173-
pub static S_IRWXU : mode_t = 448;
3174-
pub static S_IXUSR : mode_t = 64;
3175-
pub static S_IWUSR : mode_t = 128;
3176-
pub static S_IRUSR : mode_t = 256;
3159+
pub static S_IFIFO : c_int = 4096;
3160+
pub static S_IFCHR : c_int = 8192;
3161+
pub static S_IFBLK : c_int = 24576;
3162+
pub static S_IFDIR : c_int = 16384;
3163+
pub static S_IFREG : c_int = 32768;
3164+
pub static S_IFLNK : c_int = 40960;
3165+
pub static S_IFMT : c_int = 61440;
3166+
pub static S_IEXEC : c_int = 64;
3167+
pub static S_IWRITE : c_int = 128;
3168+
pub static S_IREAD : c_int = 256;
3169+
pub static S_IRWXU : c_int = 448;
3170+
pub static S_IXUSR : c_int = 64;
3171+
pub static S_IWUSR : c_int = 128;
3172+
pub static S_IRUSR : c_int = 256;
31773173
pub static F_OK : c_int = 0;
31783174
pub static R_OK : c_int = 4;
31793175
pub static W_OK : c_int = 2;
@@ -3862,7 +3858,7 @@ pub mod funcs {
38623858
use types::os::arch::posix88::mode_t;
38633859

38643860
extern {
3865-
pub fn open(path: *const c_char, oflag: c_int, mode: mode_t)
3861+
pub fn open(path: *const c_char, oflag: c_int, mode: c_int)
38663862
-> c_int;
38673863
pub fn creat(path: *const c_char, mode: mode_t) -> c_int;
38683864
pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int;

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,6 @@ pub fn find_crate_name(sess: Option<&Session>,
555555
s
556556
};
557557

558-
// Look in attributes 100% of the time to make sure the attribute is marked
559-
// as used. After doing this, however, favor crate names from the command
560-
// line.
561-
let attr_crate_name = attrs.iter().find(|at| at.check_name("crate_name"))
562-
.and_then(|at| at.value_str().map(|s| (at, s)));
563-
564558
match sess {
565559
Some(sess) => {
566560
match sess.opts.crate_name {
@@ -571,7 +565,9 @@ pub fn find_crate_name(sess: Option<&Session>,
571565
None => {}
572566
}
573567

574-
match attr_crate_name {
568+
let crate_name = attrs.iter().find(|at| at.check_name("crate_name"))
569+
.and_then(|at| at.value_str().map(|s| (at, s)));
570+
match crate_name {
575571
Some((attr, s)) => return validate(s.get().to_string(), Some(attr.span)),
576572
None => {}
577573
}

branches/auto/src/librustc/lint/builtin.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,11 +758,6 @@ impl LintPass for NonCamelCaseTypes {
758758
}
759759
}
760760

761-
let has_extern_repr = it.attrs.iter().fold(attr::ReprAny, |acc, attr| {
762-
attr::find_repr_attr(cx.tcx.sess.diagnostic(), attr, acc)
763-
}) == attr::ReprExtern;
764-
if has_extern_repr { return }
765-
766761
match it.node {
767762
ast::ItemTy(..) | ast::ItemStruct(..) => {
768763
check_case(cx, "type", it.ident, it.span)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ fn encode_info_for_method(ecx: &EncodeContext,
799799
} else {
800800
encode_symbol(ecx, ebml_w, m.def_id.node);
801801
}
802-
encode_method_argument_names(ebml_w, &*ast_method.decl);
802+
encode_method_argument_names(ebml_w, method_fn_decl(&*ast_method));
803803
}
804804

805805
ebml_w.end_tag();
@@ -1241,7 +1241,7 @@ fn encode_info_for_item(ecx: &EncodeContext,
12411241
encode_method_sort(ebml_w, 'p');
12421242
encode_inlined_item(ecx, ebml_w,
12431243
IIMethodRef(def_id, true, &*m));
1244-
encode_method_argument_names(ebml_w, &*m.decl);
1244+
encode_method_argument_names(ebml_w, method_fn_decl(m));
12451245
}
12461246
}
12471247

branches/auto/src/librustc/middle/astencode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub fn decode_inlined_item(cdata: &cstore::crate_metadata,
136136
let ident = match ii {
137137
ast::IIItem(i) => i.ident,
138138
ast::IIForeign(i) => i.ident,
139-
ast::IIMethod(_, _, m) => m.ident,
139+
ast::IIMethod(_, _, m) => ast_util::method_ident(&*m),
140140
};
141141
debug!("Fn named: {}", token::get_ident(ident));
142142
debug!("< Decoded inlined fn: {}::{}",

0 commit comments

Comments
 (0)