Skip to content

Commit 9554e09

Browse files
committed
---
yaml --- r: 131799 b: refs/heads/dist-snap c: 2cf68ba h: refs/heads/master i: 131797: 3fe471b 131795: a671467 131791: c80fd5c v: v3
1 parent 9c3cb7e commit 9554e09

File tree

14 files changed

+68
-152
lines changed

14 files changed

+68
-152
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 88231a9b70574990363262e6be8451df8782e4ca
9+
refs/heads/dist-snap: 2cf68ba10106a73b52b3cc7893c0a0a08e8a2018
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/src/librustdoc/html/format.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,7 @@ impl fmt::Show for clean::Type {
431431
}
432432
clean::Tuple(ref typs) => {
433433
primitive_link(f, clean::PrimitiveTuple,
434-
match typs.as_slice() {
435-
[ref one] => format!("({},)", one),
436-
many => format!("({:#})", many)
437-
}.as_slice())
434+
format!("({:#})", typs).as_slice())
438435
}
439436
clean::Vector(ref t) => {
440437
primitive_link(f, clean::Slice, format!("[{}]", **t).as_slice())

branches/dist-snap/src/librustuv/file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ mod test {
547547
let path = &"./tmp/mk_rm_dir".to_c_str();
548548
let mode = S_IWUSR | S_IRUSR;
549549

550-
let result = FsRequest::mkdir(l(), path, mode as c_int);
550+
let result = FsRequest::mkdir(l(), path, mode);
551551
assert!(result.is_ok());
552552

553553
let result = FsRequest::rmdir(l(), path);

branches/dist-snap/src/libstd/hash.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@
6161
* ```
6262
*/
6363

64-
#![experimental]
65-
6664
pub use core_collections::hash::{Hash, Hasher, Writer, hash, sip};
6765

6866
use default::Default;

branches/dist-snap/src/libstd/io/fs.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,6 @@ pub fn lstat(path: &Path) -> IoResult<FileStat> {
330330
}
331331

332332
fn from_rtio(s: rtio::FileStat) -> FileStat {
333-
#[cfg(windows)]
334-
type Mode = libc::c_int;
335-
#[cfg(unix)]
336-
type Mode = libc::mode_t;
337-
338333
let rtio::FileStat {
339334
size, kind, perm, created, modified,
340335
accessed, device, inode, rdev,
@@ -343,7 +338,7 @@ fn from_rtio(s: rtio::FileStat) -> FileStat {
343338

344339
FileStat {
345340
size: size,
346-
kind: match (kind as Mode) & libc::S_IFMT {
341+
kind: match (kind as libc::c_int) & libc::S_IFMT {
347342
libc::S_IFREG => io::TypeFile,
348343
libc::S_IFDIR => io::TypeDirectory,
349344
libc::S_IFIFO => io::TypeNamedPipe,

branches/dist-snap/src/libstd/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
//! passing. [`sync`](sync/index.html) contains further, primitive, shared
7979
//! memory types, including [`atomics`](sync/atomics/index.html).
8080
//!
81-
//! Common types of I/O, including files, TCP, UPD, pipes, Unix domain sockets,
81+
//! Common types of I/O, including files, TCP, UDP, pipes, Unix domain sockets,
8282
//! timers, and process spawning, are defined in the [`io`](io/index.html) module.
8383
//!
8484
//! Rust's I/O and concurrency depends on a small runtime interface

0 commit comments

Comments
 (0)