Skip to content

Commit 0eabe9a

Browse files
committed
---
yaml --- r: 193278 b: refs/heads/beta c: ef8b20a h: refs/heads/master v: v3
1 parent ccad6e4 commit 0eabe9a

39 files changed

+468
-217
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 2fc62244113d01e9524ed712210ba52e8471e2a9
34+
refs/heads/beta: ef8b20a564bab2050403f2f5c1dab90e0941adf7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ then
875875
| cut -d ' ' -f 2)
876876

877877
case $CFG_CLANG_VERSION in
878-
(3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
878+
(3.2* | 3.3* | 3.4* | 3.5* | 3.6*)
879879
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
880880
if [ -z "$CC" ]
881881
then

branches/beta/src/libcollections/str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,9 +1455,9 @@ pub trait StrExt: Index<RangeFull, Output = str> {
14551455
///
14561456
/// `is_cjk` determines behavior for characters in the Ambiguous category: if `is_cjk` is
14571457
/// `true`, these are 2 columns wide; otherwise, they are 1. In CJK locales, `is_cjk` should be
1458-
/// `true`, else it should be `false`. [Unicode Standard Annex
1459-
/// #11](http://www.unicode.org/reports/tr11/) recommends that these characters be treated as 1
1460-
/// column (i.e., `is_cjk` = `false`) if the locale is unknown.
1458+
/// `true`, else it should be `false`.
1459+
/// [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) recommends that these
1460+
/// characters be treated as 1 column (i.e., `is_cjk = false`) if the locale is unknown.
14611461
#[unstable(feature = "collections",
14621462
reason = "this functionality may only be provided by libunicode")]
14631463
fn width(&self, is_cjk: bool) -> usize {

branches/beta/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ impl Display for char {
700700
impl<T> Pointer for *const T {
701701
fn fmt(&self, f: &mut Formatter) -> Result {
702702
f.flags |= 1 << (FlagV1::Alternate as u32);
703-
let ret = LowerHex::fmt(&(*self as u32), f);
703+
let ret = LowerHex::fmt(&(*self as usize), f);
704704
f.flags &= !(1 << (FlagV1::Alternate as u32));
705705
ret
706706
}

branches/beta/src/libcore/iter.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use num::{ToPrimitive, Int};
6868
use ops::{Add, Deref, FnMut};
6969
use option::Option;
7070
use option::Option::{Some, None};
71-
use marker::{Send, Sized, Sync};
71+
use marker::Sized;
7272
use usize;
7373

7474
/// An interface for dealing with "external iterators". These types of iterators
@@ -1783,10 +1783,6 @@ pub struct Peekable<I: Iterator> {
17831783
peeked: Option<I::Item>,
17841784
}
17851785

1786-
// FIXME: after #22828 being fixed, the following unsafe impl should be removed
1787-
unsafe impl<I: Iterator> Sync for Peekable<I> where I: Sync, I::Item: Sync {}
1788-
unsafe impl<I: Iterator> Send for Peekable<I> where I: Send, I::Item: Send {}
1789-
17901786
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
17911787
fn clone(&self) -> Peekable<I> {
17921788
Peekable {

branches/beta/src/libcore/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//! distribution.
4040
//!
4141
//! * `rust_begin_unwind` - This function takes three arguments, a
42-
//! `fmt::Arguments`, a `&str`, and a `uint`. These three arguments dictate
42+
//! `fmt::Arguments`, a `&str`, and a `usize`. These three arguments dictate
4343
//! the panic message, the file at which panic was invoked, and the line.
4444
//! It is up to consumers of this core library to define this panic
4545
//! function; it is only required to never return.
@@ -88,14 +88,12 @@ mod int_macros;
8888
#[macro_use]
8989
mod uint_macros;
9090

91-
#[path = "num/int.rs"] pub mod int;
9291
#[path = "num/isize.rs"] pub mod isize;
9392
#[path = "num/i8.rs"] pub mod i8;
9493
#[path = "num/i16.rs"] pub mod i16;
9594
#[path = "num/i32.rs"] pub mod i32;
9695
#[path = "num/i64.rs"] pub mod i64;
9796

98-
#[path = "num/uint.rs"] pub mod uint;
9997
#[path = "num/usize.rs"] pub mod usize;
10098
#[path = "num/u8.rs"] pub mod u8;
10199
#[path = "num/u16.rs"] pub mod u16;

branches/beta/src/libcore/num/int.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

branches/beta/src/libcore/num/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,10 @@ pub trait Int
372372
#[unstable(feature = "core",
373373
reason = "pending integer conventions")]
374374
#[inline]
375-
fn pow(self, mut exp: uint) -> Self {
375+
fn pow(self, mut exp: u32) -> Self {
376376
let mut base = self;
377377
let mut acc: Self = Int::one();
378+
378379
while exp > 0 {
379380
if (exp & 1) == 1 {
380381
acc = acc * base;

branches/beta/src/libcore/num/uint.rs

Lines changed: 0 additions & 20 deletions
This file was deleted.

branches/beta/src/libcoretest/iter.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use core::iter::*;
1212
use core::iter::order::*;
1313
use core::iter::MinMaxResult::*;
1414
use core::num::SignedInt;
15-
use core::uint;
15+
use core::usize;
1616
use core::cmp;
1717

1818
use test::Bencher;
@@ -292,7 +292,7 @@ fn test_unfoldr() {
292292
fn test_cycle() {
293293
let cycle_len = 3;
294294
let it = count(0, 1).take(cycle_len).cycle();
295-
assert_eq!(it.size_hint(), (uint::MAX, None));
295+
assert_eq!(it.size_hint(), (usize::MAX, None));
296296
for (i, x) in it.take(100).enumerate() {
297297
assert_eq!(i % cycle_len, x);
298298
}
@@ -365,19 +365,19 @@ fn test_iterator_size_hint() {
365365
let v2 = &[10, 11, 12];
366366
let vi = v.iter();
367367

368-
assert_eq!(c.size_hint(), (uint::MAX, None));
368+
assert_eq!(c.size_hint(), (usize::MAX, None));
369369
assert_eq!(vi.clone().size_hint(), (10, Some(10)));
370370

371371
assert_eq!(c.clone().take(5).size_hint(), (5, Some(5)));
372372
assert_eq!(c.clone().skip(5).size_hint().1, None);
373373
assert_eq!(c.clone().take_while(|_| false).size_hint(), (0, None));
374374
assert_eq!(c.clone().skip_while(|_| false).size_hint(), (0, None));
375-
assert_eq!(c.clone().enumerate().size_hint(), (uint::MAX, None));
376-
assert_eq!(c.clone().chain(vi.clone().cloned()).size_hint(), (uint::MAX, None));
375+
assert_eq!(c.clone().enumerate().size_hint(), (usize::MAX, None));
376+
assert_eq!(c.clone().chain(vi.clone().cloned()).size_hint(), (usize::MAX, None));
377377
assert_eq!(c.clone().zip(vi.clone()).size_hint(), (10, Some(10)));
378378
assert_eq!(c.clone().scan(0, |_,_| Some(0)).size_hint(), (0, None));
379379
assert_eq!(c.clone().filter(|_| false).size_hint(), (0, None));
380-
assert_eq!(c.clone().map(|_| 0).size_hint(), (uint::MAX, None));
380+
assert_eq!(c.clone().map(|_| 0).size_hint(), (usize::MAX, None));
381381
assert_eq!(c.filter_map(|_| Some(0)).size_hint(), (0, None));
382382

383383
assert_eq!(vi.clone().take(5).size_hint(), (5, Some(5)));
@@ -753,7 +753,7 @@ fn test_range() {
753753

754754
assert_eq!((0..100).size_hint(), (100, Some(100)));
755755
// this test is only meaningful when sizeof uint < sizeof u64
756-
assert_eq!((uint::MAX - 1..uint::MAX).size_hint(), (1, Some(1)));
756+
assert_eq!((usize::MAX - 1..usize::MAX).size_hint(), (1, Some(1)));
757757
assert_eq!((-10..-1).size_hint(), (9, Some(9)));
758758
assert_eq!((-1..-10).size_hint(), (0, Some(0)));
759759
}

branches/beta/src/libcoretest/num/int_macros.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ macro_rules! int_module { ($T:ty, $T_i:ident) => (
1212
#[cfg(test)]
1313
mod tests {
1414
use core::$T_i::*;
15-
use core::int;
15+
use core::isize;
1616
use core::num::{FromStrRadix, Int, SignedInt};
1717
use core::ops::{Shl, Shr, Not, BitXor, BitAnd, BitOr};
1818
use num;
@@ -153,7 +153,7 @@ mod tests {
153153
fn test_signed_checked_div() {
154154
assert!(10.checked_div(2) == Some(5));
155155
assert!(5.checked_div(0) == None);
156-
assert!(int::MIN.checked_div(-1) == None);
156+
assert!(isize::MIN.checked_div(-1) == None);
157157
}
158158

159159
#[test]
@@ -201,6 +201,17 @@ mod tests {
201201
assert_eq!(FromStrRadix::from_str_radix("Z", 35).ok(), None::<$T>);
202202
assert_eq!(FromStrRadix::from_str_radix("-9", 2).ok(), None::<$T>);
203203
}
204+
205+
#[test]
206+
fn test_pow() {
207+
let mut r = 2 as $T;
208+
209+
assert_eq!(r.pow(2u32), 4 as $T);
210+
assert_eq!(r.pow(0u32), 1 as $T);
211+
r = -2 as $T;
212+
assert_eq!(r.pow(2u32), 4 as $T);
213+
assert_eq!(r.pow(3u32), -8 as $T);
214+
}
204215
}
205216

206217
)}

branches/beta/src/libcoretest/num/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ mod i8;
2121
mod i16;
2222
mod i32;
2323
mod i64;
24-
mod int;
2524

2625
#[macro_use]
2726
mod uint_macros;
@@ -30,7 +29,6 @@ mod u8;
3029
mod u16;
3130
mod u32;
3231
mod u64;
33-
mod uint;
3432

3533
/// Helper function for testing numeric operations
3634
pub fn test_num<T>(ten: T, two: T) where

branches/beta/src/libcoretest/num/uint.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

branches/beta/src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ fn test_split_within() {
963963
"little lamb".to_string(),
964964
"Little lamb".to_string()
965965
]);
966-
t("\nMary had a little lamb\nLittle lamb\n", ::std::uint::MAX,
966+
t("\nMary had a little lamb\nLittle lamb\n", ::std::usize::MAX,
967967
&["Mary had a little lamb\nLittle lamb".to_string()]);
968968
}
969969

branches/beta/src/librand/rand_impls.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@
1212
1313
use core::prelude::*;
1414
use core::char;
15-
use core::int;
16-
use core::uint;
15+
use core::isize;
16+
use core::usize;
1717

1818
use {Rand,Rng};
1919

20-
impl Rand for int {
20+
impl Rand for isize {
2121
#[inline]
22-
fn rand<R: Rng>(rng: &mut R) -> int {
23-
if int::BITS == 32 {
24-
rng.gen::<i32>() as int
22+
fn rand<R: Rng>(rng: &mut R) -> isize {
23+
if isize::BITS == 32 {
24+
rng.gen::<i32>() as isize
2525
} else {
26-
rng.gen::<i64>() as int
26+
rng.gen::<i64>() as isize
2727
}
2828
}
2929
}
@@ -56,13 +56,13 @@ impl Rand for i64 {
5656
}
5757
}
5858

59-
impl Rand for uint {
59+
impl Rand for usize {
6060
#[inline]
61-
fn rand<R: Rng>(rng: &mut R) -> uint {
62-
if uint::BITS == 32 {
63-
rng.gen::<u32>() as uint
61+
fn rand<R: Rng>(rng: &mut R) -> usize {
62+
if usize::BITS == 32 {
63+
rng.gen::<u32>() as usize
6464
} else {
65-
rng.gen::<u64>() as uint
65+
rng.gen::<u64>() as usize
6666
}
6767
}
6868
}

0 commit comments

Comments
 (0)