Skip to content

Commit b9eb16e

Browse files
committed
---
yaml --- r: 166485 b: refs/heads/snap-stage3 c: 5ba6102 h: refs/heads/master i: 166483: 59f5a29 v: v3
1 parent 6a3f559 commit b9eb16e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1400
-355
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 18842f89f084c52588fe7cffe07f87bf6e90796a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 177529267dd12e698435f84557e27307034e211d
4+
refs/heads/snap-stage3: 5ba6102657a892457063d2d6a7cbb9632ce282c6
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/cfg/x86_64-unknown-dragonfly.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).so
77
CFG_STATIC_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).a
88
CFG_LIB_GLOB_x86_64-unknown-dragonfly=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_x86_64-unknown-dragonfly=$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -I/usr/include -I/usr/local/include $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -I/usr/include -I/usr/local/include $(CFLAGS)
12-
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt -m64
1313
CFG_GCCISH_DEF_FLAG_x86_64-unknown-dragonfly := -Wl,--export-dynamic,--dynamic-list=
1414
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-whole-archive
1515
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-no-whole-archive

branches/snap-stage3/src/doc/complement-bugreport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ miss out on valid bug reports.
3434
It generally helps our diagnosis to include your specific OS (for example: Mac OS X 10.8.3,
3535
Windows 7, Ubuntu 12.04) and your hardware architecture (for example: i686, x86_64).
3636
It's also helpful to provide the exact version and host by copying the output of
37-
re-running the erroneous rustc command with the `--version=verbose` flag, which will
37+
re-running the erroneous rustc command with the `--version --verbose` flags, which will
3838
produce something like this:
3939

4040
```text

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ names, and invoked through a consistent syntax: `name!(...)`. Examples include:
640640
* `stringify!` : pretty-print the Rust expression given as an argument
641641
* `include!` : include the Rust expression in the given file
642642
* `include_str!` : include the contents of the given file as a string
643-
* `include_bin!` : include the contents of the given file as a binary blob
643+
* `include_bytes!` : include the contents of the given file as a binary blob
644644
* `error!`, `warn!`, `info!`, `debug!` : provide diagnostic information.
645645

646646
All of the above extensions are expressions with values.

branches/snap-stage3/src/etc/rustup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ install_package() {
441441
install_script="$2"
442442

443443
msg "Extracting ${tarball_name}"
444-
(cd "${CFG_TMP_DIR}" && "${CFG_TAR}" -xvf "${tarball_name}")
444+
(cd "${CFG_TMP_DIR}" && "${CFG_TAR}" -xzf "${tarball_name}")
445445
if [ $? -ne 0 ]; then
446446
rm -Rf "${CFG_TMP_DIR}"
447447
err "failed to unpack installer"

branches/snap-stage3/src/etc/snapshot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def scrub(b):
3737
"macos": ["bin/rustc"],
3838
"winnt": ["bin/rustc.exe"],
3939
"freebsd": ["bin/rustc"],
40+
"dragonfly": ["bin/rustc"],
4041
}
4142

4243
winnt_runtime_deps_32 = ["libgcc_s_dw2-1.dll",
@@ -86,6 +87,8 @@ def get_kernel(triple):
8687
return "macos"
8788
if os_name == "freebsd":
8889
return "freebsd"
90+
if os_name == "dragonfly":
91+
return "dragonfly"
8992
return "linux"
9093

9194
def get_cpu(triple):

branches/snap-stage3/src/libcollections/ring_buf.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,9 +1295,6 @@ impl<A: PartialEq> PartialEq for RingBuf<A> {
12951295
self.len() == other.len() &&
12961296
self.iter().zip(other.iter()).all(|(a, b)| a.eq(b))
12971297
}
1298-
fn ne(&self, other: &RingBuf<A>) -> bool {
1299-
!self.eq(other)
1300-
}
13011298
}
13021299

13031300
impl<A: Eq> Eq for RingBuf<A> {}

branches/snap-stage3/src/libcollections/vec_map.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ use vec::Vec;
6060
/// months.clear();
6161
/// assert!(months.is_empty());
6262
/// ```
63-
#[deriving(PartialEq, Eq)]
6463
pub struct VecMap<V> {
6564
v: Vec<Option<V>>,
6665
}
@@ -492,6 +491,14 @@ impl<V:Clone> VecMap<V> {
492491
}
493492
}
494493

494+
impl<V: PartialEq> PartialEq for VecMap<V> {
495+
fn eq(&self, other: &VecMap<V>) -> bool {
496+
iter::order::eq(self.iter(), other.iter())
497+
}
498+
}
499+
500+
impl<V: Eq> Eq for VecMap<V> {}
501+
495502
impl<V: PartialOrd> PartialOrd for VecMap<V> {
496503
#[inline]
497504
fn partial_cmp(&self, other: &VecMap<V>) -> Option<Ordering> {
@@ -955,6 +962,10 @@ mod test_map {
955962
assert!(a != b);
956963
assert!(b.insert(5, 19).is_none());
957964
assert!(a == b);
965+
966+
a = VecMap::new();
967+
b = VecMap::with_capacity(1);
968+
assert!(a == b);
958969
}
959970

960971
#[test]

branches/snap-stage3/src/libcore/fmt/float.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ use char;
1818
use char::Char;
1919
use fmt;
2020
use iter::{range, DoubleEndedIteratorExt};
21-
use num::{Float, FPNaN, FPInfinite, ToPrimitive};
22-
use num::cast;
21+
use num::{cast, Float, ToPrimitive};
22+
use num::FpCategory as Fp;
2323
use ops::FnOnce;
2424
use result::Result::Ok;
2525
use slice::{mod, SliceExt};
@@ -109,11 +109,11 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
109109
let _1: T = Float::one();
110110

111111
match num.classify() {
112-
FPNaN => return f("NaN".as_bytes()),
113-
FPInfinite if num > _0 => {
112+
Fp::Nan => return f("NaN".as_bytes()),
113+
Fp::Infinite if num > _0 => {
114114
return f("inf".as_bytes());
115115
}
116-
FPInfinite if num < _0 => {
116+
Fp::Infinite if num < _0 => {
117117
return f("-inf".as_bytes());
118118
}
119119
_ => {}

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,6 +2542,64 @@ impl<A: Int> Iterator<A> for RangeStepInclusive<A> {
25422542
}
25432543
}
25442544

2545+
2546+
/// The `Step` trait identifies objects which can be stepped over in both
2547+
/// directions. The `steps_between` function provides a way to
2548+
/// compare two Step objects (it could be provided using `step()` and `Ord`,
2549+
/// but the implementation would be so inefficient as to be useless).
2550+
#[unstable = "Trait is unstable."]
2551+
pub trait Step: Ord {
2552+
/// Change self to the next object.
2553+
fn step(&mut self);
2554+
/// Change self to the previous object.
2555+
fn step_back(&mut self);
2556+
/// The steps_between two step objects.
2557+
/// a should always be less than b, so the result should never be negative.
2558+
/// Return None if it is not possible to calculate steps_between without
2559+
/// overflow.
2560+
fn steps_between(a: &Self, b: &Self) -> Option<uint>;
2561+
}
2562+
2563+
macro_rules! step_impl {
2564+
($($t:ty)*) => ($(
2565+
#[unstable = "Trait is unstable."]
2566+
impl Step for $t {
2567+
#[inline]
2568+
fn step(&mut self) { *self += 1; }
2569+
#[inline]
2570+
fn step_back(&mut self) { *self -= 1; }
2571+
#[inline]
2572+
fn steps_between(a: &$t, b: &$t) -> Option<uint> {
2573+
debug_assert!(a < b);
2574+
Some((*a - *b) as uint)
2575+
}
2576+
}
2577+
)*)
2578+
}
2579+
2580+
macro_rules! step_impl_no_between {
2581+
($($t:ty)*) => ($(
2582+
#[unstable = "Trait is unstable."]
2583+
impl Step for $t {
2584+
#[inline]
2585+
fn step(&mut self) { *self += 1; }
2586+
#[inline]
2587+
fn step_back(&mut self) { *self -= 1; }
2588+
#[inline]
2589+
fn steps_between(_a: &$t, _b: &$t) -> Option<uint> {
2590+
None
2591+
}
2592+
}
2593+
)*)
2594+
}
2595+
2596+
step_impl!(uint u8 u16 u32 int i8 i16 i32);
2597+
#[cfg(target_word_size = "64")]
2598+
step_impl!(u64 i64);
2599+
#[cfg(target_word_size = "32")]
2600+
step_impl_no_between!(u64 i64);
2601+
2602+
25452603
/// An iterator that repeats an element endlessly
25462604
#[deriving(Clone)]
25472605
#[stable]

branches/snap-stage3/src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#![allow(unknown_features, raw_pointer_deriving)]
6060
#![feature(globs, intrinsics, lang_items, macro_rules, phase)]
6161
#![feature(simd, unsafe_destructor, slicing_syntax)]
62-
#![feature(default_type_params, unboxed_closures)]
62+
#![feature(default_type_params, unboxed_closures, associated_types)]
6363
#![deny(missing_docs)]
6464

6565
mod macros;

branches/snap-stage3/src/libcore/num/f32.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
use intrinsics;
2020
use mem;
21-
use num::{Float, FPNormal, FPCategory, FPZero, FPSubnormal, FPInfinite, FPNaN};
21+
use num::Float;
22+
use num::FpCategory as Fp;
2223
use num::from_str_radix;
2324
use option::Option;
2425

@@ -156,23 +157,23 @@ impl Float for f32 {
156157
/// Returns `true` if the number is neither zero, infinite, subnormal or NaN.
157158
#[inline]
158159
fn is_normal(self) -> bool {
159-
self.classify() == FPNormal
160+
self.classify() == Fp::Normal
160161
}
161162

162163
/// Returns the floating point category of the number. If only one property
163164
/// is going to be tested, it is generally faster to use the specific
164165
/// predicate instead.
165-
fn classify(self) -> FPCategory {
166+
fn classify(self) -> Fp {
166167
const EXP_MASK: u32 = 0x7f800000;
167168
const MAN_MASK: u32 = 0x007fffff;
168169

169170
let bits: u32 = unsafe { mem::transmute(self) };
170171
match (bits & MAN_MASK, bits & EXP_MASK) {
171-
(0, 0) => FPZero,
172-
(_, 0) => FPSubnormal,
173-
(0, EXP_MASK) => FPInfinite,
174-
(_, EXP_MASK) => FPNaN,
175-
_ => FPNormal,
172+
(0, 0) => Fp::Zero,
173+
(_, 0) => Fp::Subnormal,
174+
(0, EXP_MASK) => Fp::Infinite,
175+
(_, EXP_MASK) => Fp::Nan,
176+
_ => Fp::Normal,
176177
}
177178
}
178179

branches/snap-stage3/src/libcore/num/f64.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919
use intrinsics;
2020
use mem;
21-
use num::{Float, FPNormal, FPCategory, FPZero, FPSubnormal, FPInfinite, FPNaN};
21+
use num::Float;
22+
use num::FpCategory as Fp;
2223
use num::from_str_radix;
2324
use option::Option;
2425

@@ -164,23 +165,23 @@ impl Float for f64 {
164165
/// Returns `true` if the number is neither zero, infinite, subnormal or NaN.
165166
#[inline]
166167
fn is_normal(self) -> bool {
167-
self.classify() == FPNormal
168+
self.classify() == Fp::Normal
168169
}
169170

170171
/// Returns the floating point category of the number. If only one property
171172
/// is going to be tested, it is generally faster to use the specific
172173
/// predicate instead.
173-
fn classify(self) -> FPCategory {
174+
fn classify(self) -> Fp {
174175
const EXP_MASK: u64 = 0x7ff0000000000000;
175176
const MAN_MASK: u64 = 0x000fffffffffffff;
176177

177178
let bits: u64 = unsafe { mem::transmute(self) };
178179
match (bits & MAN_MASK, bits & EXP_MASK) {
179-
(0, 0) => FPZero,
180-
(_, 0) => FPSubnormal,
181-
(0, EXP_MASK) => FPInfinite,
182-
(_, EXP_MASK) => FPNaN,
183-
_ => FPNormal,
180+
(0, 0) => Fp::Zero,
181+
(_, 0) => Fp::Subnormal,
182+
(0, EXP_MASK) => Fp::Infinite,
183+
(_, EXP_MASK) => Fp::Nan,
184+
_ => Fp::Normal,
184185
}
185186
}
186187

branches/snap-stage3/src/libcore/num/mod.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#![stable]
1616
#![allow(missing_docs)]
1717

18-
pub use self::FPCategory::*;
19-
2018
use {int, i8, i16, i32, i64};
2119
use {uint, u8, u16, u32, u64};
2220
use {f32, f64};
@@ -1222,17 +1220,17 @@ impl_num_cast! { f64, to_f64 }
12221220
/// Used for representing the classification of floating point numbers
12231221
#[deriving(Copy, PartialEq, Show)]
12241222
#[unstable = "may be renamed"]
1225-
pub enum FPCategory {
1223+
pub enum FpCategory {
12261224
/// "Not a Number", often obtained by dividing by zero
1227-
FPNaN,
1225+
Nan,
12281226
/// Positive or negative infinity
1229-
FPInfinite ,
1227+
Infinite ,
12301228
/// Positive or negative zero
1231-
FPZero,
1232-
/// De-normalized floating point representation (less precise than `FPNormal`)
1233-
FPSubnormal,
1229+
Zero,
1230+
/// De-normalized floating point representation (less precise than `Normal`)
1231+
Subnormal,
12341232
/// A regular floating point number
1235-
FPNormal,
1233+
Normal,
12361234
}
12371235

12381236
/// A built-in floating point number.
@@ -1277,7 +1275,7 @@ pub trait Float
12771275
/// Returns true if this number is neither zero, infinite, denormal, or NaN.
12781276
fn is_normal(self) -> bool;
12791277
/// Returns the category that this number falls into.
1280-
fn classify(self) -> FPCategory;
1278+
fn classify(self) -> FpCategory;
12811279

12821280
// FIXME (#5527): These should be associated constants
12831281

0 commit comments

Comments
 (0)