Skip to content

Commit 55646ce

Browse files
committed
---
yaml --- r: 274151 b: refs/heads/stable c: 8f36038 h: refs/heads/master i: 274149: 73994d2 274147: b508626 274143: d16c78a
1 parent 4f1e01e commit 55646ce

File tree

136 files changed

+2820
-2028
lines changed

Some content is hidden

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

136 files changed

+2820
-2028
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 56c73e58a24c7106e7160df4624b64bf7672e089
32+
refs/heads/stable: 8f36038490559a98efcba3521564663b15785d9c
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ CFG_SELF="$0"
550550
CFG_CONFIGURE_ARGS="$@"
551551

552552

553-
case "${CFG_SRC_DIR}" in
553+
case "${CFG_SRC_DIR}" in
554554
*\ * )
555555
err "The path to the rust source directory contains spaces, which is not supported"
556556
;;
@@ -892,6 +892,13 @@ then
892892
CFG_DISABLE_JEMALLOC=1
893893
fi
894894

895+
if [ $CFG_OSTYPE = pc-windows-gnu ]
896+
then
897+
# FIXME(#31030) - there's not a great reason to disable jemalloc here
898+
step_msg "on Windows, disabling jemalloc"
899+
CFG_DISABLE_JEMALLOC=1
900+
fi
901+
895902
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
896903
# system, so if we find that gcc is clang, we should just use clang directly.
897904
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
@@ -1354,16 +1361,22 @@ for h in $CFG_HOST
13541361
do
13551362
for t in $CFG_TARGET
13561363
do
1364+
# host bin dir stage0
1365+
make_dir $h/stage0/bin
1366+
13571367
# host lib dir stage0
13581368
make_dir $h/stage0/lib
13591369

1370+
# host test dir stage0
1371+
make_dir $h/stage0/test
1372+
13601373
# target bin dir stage0
13611374
make_dir $h/stage0/lib/rustlib/$t/bin
13621375

13631376
# target lib dir stage0
13641377
make_dir $h/stage0/lib/rustlib/$t/lib
13651378

1366-
for i in 0 1 2 3
1379+
for i in 1 2 3
13671380
do
13681381
# host bin dir
13691382
make_dir $h/stage$i/bin

branches/stable/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ DEPS_rustc_front := std syntax log serialize
102102
DEPS_rustc_lint := rustc log syntax
103103
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
104104
DEPS_rustc_metadata := rustc rustc_front syntax rbml
105-
DEPS_rustc_passes := syntax rustc core
105+
DEPS_rustc_passes := syntax rustc core rustc_front
106106
DEPS_rustc_mir := rustc rustc_front syntax
107107
DEPS_rustc_resolve := arena rustc rustc_front log syntax
108108
DEPS_rustc_platform_intrinsics := rustc rustc_llvm

branches/stable/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.7.0
16+
CFG_RELEASE_NUM=1.8.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/stable/src/jemalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit f84e30927284b0c500ed3eaf09e8e159da20ddaf
1+
Subproject commit e24a1a025a1f214e40eedafe3b9c7b1d69937922

branches/stable/src/liballoc/arc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ pub struct Weak<T: ?Sized> {
149149
_ptr: Shared<ArcInner<T>>,
150150
}
151151

152-
#[stable(feature = "rust1", since = "1.0.0")]
152+
#[stable(feature = "arc_weak", since = "1.4.0")]
153153
unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> {}
154-
#[stable(feature = "rust1", since = "1.0.0")]
154+
#[stable(feature = "arc_weak", since = "1.4.0")]
155155
unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
156156

157157
#[unstable(feature = "coerce_unsized", issue = "27732")]
158158
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
159159

160-
#[stable(feature = "rust1", since = "1.0.0")]
160+
#[stable(feature = "arc_weak", since = "1.4.0")]
161161
impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
162162
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
163163
write!(f, "(Weak)")
@@ -681,7 +681,7 @@ impl<T: ?Sized> Clone for Weak<T> {
681681
}
682682
}
683683

684-
#[stable(feature = "rust1", since = "1.0.0")]
684+
#[stable(feature = "arc_weak", since = "1.4.0")]
685685
impl<T: ?Sized> Drop for Weak<T> {
686686
/// Drops the `Weak<T>`.
687687
///

branches/stable/src/liballoc/rc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,9 @@ pub struct Weak<T: ?Sized> {
715715
_ptr: Shared<RcBox<T>>,
716716
}
717717

718-
#[stable(feature = "rust1", since = "1.0.0")]
718+
#[stable(feature = "rc_weak", since = "1.4.0")]
719719
impl<T: ?Sized> !marker::Send for Weak<T> {}
720-
#[stable(feature = "rust1", since = "1.0.0")]
720+
#[stable(feature = "rc_weak", since = "1.4.0")]
721721
impl<T: ?Sized> !marker::Sync for Weak<T> {}
722722

723723
#[unstable(feature = "coerce_unsized", issue = "27732")]
@@ -753,7 +753,7 @@ impl<T: ?Sized> Weak<T> {
753753
}
754754
}
755755

756-
#[stable(feature = "rust1", since = "1.0.0")]
756+
#[stable(feature = "rc_weak", since = "1.4.0")]
757757
impl<T: ?Sized> Drop for Weak<T> {
758758
/// Drops the `Weak<T>`.
759759
///
@@ -819,7 +819,7 @@ impl<T: ?Sized> Clone for Weak<T> {
819819
}
820820
}
821821

822-
#[stable(feature = "rust1", since = "1.0.0")]
822+
#[stable(feature = "rc_weak", since = "1.4.0")]
823823
impl<T: ?Sized + fmt::Debug> fmt::Debug for Weak<T> {
824824
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
825825
write!(f, "(Weak)")

branches/stable/src/libcollections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,8 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10271027
}
10281028
self.node.as_leaf_mut().len -= 1;
10291029

1030+
left_node.as_leaf_mut().len += right_len as u16 + 1;
1031+
10301032
if self.node.height > 1 {
10311033
ptr::copy_nonoverlapping(
10321034
right_node.cast_unchecked().as_internal().edges.as_ptr(),
@@ -1058,8 +1060,6 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10581060
);
10591061
}
10601062

1061-
left_node.as_leaf_mut().len += right_len as u16 + 1;
1062-
10631063
Handle::new_edge(self.node, self.idx)
10641064
}
10651065
}

branches/stable/src/libcore/cmp.rs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
use self::Ordering::*;
2121

22-
use mem;
2322
use marker::Sized;
2423
use option::Option::{self, Some};
2524

@@ -119,10 +118,6 @@ pub enum Ordering {
119118
}
120119

121120
impl Ordering {
122-
unsafe fn from_i8_unchecked(v: i8) -> Ordering {
123-
mem::transmute(v)
124-
}
125-
126121
/// Reverse the `Ordering`.
127122
///
128123
/// * `Less` becomes `Greater`.
@@ -155,14 +150,10 @@ impl Ordering {
155150
#[inline]
156151
#[stable(feature = "rust1", since = "1.0.0")]
157152
pub fn reverse(self) -> Ordering {
158-
unsafe {
159-
// this compiles really nicely (to a single instruction);
160-
// an explicit match has a pile of branches and
161-
// comparisons.
162-
//
163-
// NB. it is safe because of the explicit discriminants
164-
// given above.
165-
Ordering::from_i8_unchecked(-(self as i8))
153+
match self {
154+
Less => Greater,
155+
Equal => Equal,
156+
Greater => Less,
166157
}
167158
}
168159
}

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

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ impl isize {
11531153
intrinsics::mul_with_overflow }
11541154
}
11551155

1156-
// `Int` + `UnsignedInt` implemented for signed integers
1156+
// `Int` + `UnsignedInt` implemented for unsigned integers
11571157
macro_rules! uint_impl {
11581158
($ActualT:ty, $BITS:expr,
11591159
$ctpop:path,
@@ -1457,8 +1457,8 @@ macro_rules! uint_impl {
14571457
/// Basic usage:
14581458
///
14591459
/// ```
1460-
/// assert_eq!((-127i8).checked_sub(1), Some(-128));
1461-
/// assert_eq!((-128i8).checked_sub(1), None);
1460+
/// assert_eq!(1u8.checked_sub(1), Some(0));
1461+
/// assert_eq!(0u8.checked_sub(1), None);
14621462
/// ```
14631463
#[stable(feature = "rust1", since = "1.0.0")]
14641464
#[inline]
@@ -1493,9 +1493,8 @@ macro_rules! uint_impl {
14931493
/// Basic usage:
14941494
///
14951495
/// ```
1496-
/// assert_eq!((-127i8).checked_div(-1), Some(127));
1497-
/// assert_eq!((-128i8).checked_div(-1), None);
1498-
/// assert_eq!((1i8).checked_div(0), None);
1496+
/// assert_eq!(128u8.checked_div(2), Some(64));
1497+
/// assert_eq!(1u8.checked_div(0), None);
14991498
/// ```
15001499
#[stable(feature = "rust1", since = "1.0.0")]
15011500
#[inline]
@@ -1591,16 +1590,15 @@ macro_rules! uint_impl {
15911590
/// Basic usage:
15921591
///
15931592
/// ```
1594-
/// assert_eq!(100i8.saturating_add(1), 101);
1595-
/// assert_eq!(100i8.saturating_add(127), 127);
1593+
/// assert_eq!(100u8.saturating_add(1), 101);
1594+
/// assert_eq!(200u8.saturating_add(127), 255);
15961595
/// ```
15971596
#[stable(feature = "rust1", since = "1.0.0")]
15981597
#[inline]
15991598
pub fn saturating_add(self, other: Self) -> Self {
16001599
match self.checked_add(other) {
1601-
Some(x) => x,
1602-
None if other >= Self::zero() => Self::max_value(),
1603-
None => Self::min_value(),
1600+
Some(x) => x,
1601+
None => Self::max_value(),
16041602
}
16051603
}
16061604

@@ -1612,16 +1610,15 @@ macro_rules! uint_impl {
16121610
/// Basic usage:
16131611
///
16141612
/// ```
1615-
/// assert_eq!(100i8.saturating_sub(127), -27);
1616-
/// assert_eq!((-100i8).saturating_sub(127), -128);
1613+
/// assert_eq!(100u8.saturating_sub(27), 73);
1614+
/// assert_eq!(13u8.saturating_sub(127), 0);
16171615
/// ```
16181616
#[stable(feature = "rust1", since = "1.0.0")]
16191617
#[inline]
16201618
pub fn saturating_sub(self, other: Self) -> Self {
16211619
match self.checked_sub(other) {
1622-
Some(x) => x,
1623-
None if other >= Self::zero() => Self::min_value(),
1624-
None => Self::max_value(),
1620+
Some(x) => x,
1621+
None => Self::min_value(),
16251622
}
16261623
}
16271624

@@ -1652,8 +1649,8 @@ macro_rules! uint_impl {
16521649
/// Basic usage:
16531650
///
16541651
/// ```
1655-
/// assert_eq!(100i8.wrapping_add(27), 127);
1656-
/// assert_eq!(100i8.wrapping_add(127), -29);
1652+
/// assert_eq!(200u8.wrapping_add(55), 255);
1653+
/// assert_eq!(200u8.wrapping_add(155), 99);
16571654
/// ```
16581655
#[stable(feature = "rust1", since = "1.0.0")]
16591656
#[inline]
@@ -1671,8 +1668,8 @@ macro_rules! uint_impl {
16711668
/// Basic usage:
16721669
///
16731670
/// ```
1674-
/// assert_eq!(0i8.wrapping_sub(127), -127);
1675-
/// assert_eq!((-2i8).wrapping_sub(127), 127);
1671+
/// assert_eq!(100u8.wrapping_sub(100), 0);
1672+
/// assert_eq!(100u8.wrapping_sub(155), 201);
16761673
/// ```
16771674
#[stable(feature = "rust1", since = "1.0.0")]
16781675
#[inline]
@@ -1690,8 +1687,8 @@ macro_rules! uint_impl {
16901687
/// Basic usage:
16911688
///
16921689
/// ```
1693-
/// assert_eq!(10i8.wrapping_mul(12), 120);
1694-
/// assert_eq!(11i8.wrapping_mul(12), -124);
1690+
/// assert_eq!(10u8.wrapping_mul(12), 120);
1691+
/// assert_eq!(25u8.wrapping_mul(12), 44);
16951692
/// ```
16961693
#[stable(feature = "rust1", since = "1.0.0")]
16971694
#[inline]
@@ -1701,68 +1698,64 @@ macro_rules! uint_impl {
17011698
}
17021699
}
17031700

1704-
/// Wrapping (modular) division. Computes `self / other`,
1705-
/// wrapping around at the boundary of the type.
1706-
///
1707-
/// The only case where such wrapping can occur is when one
1708-
/// divides `MIN / -1` on a signed type (where `MIN` is the
1709-
/// negative minimal value for the type); this is equivalent
1710-
/// to `-MIN`, a positive value that is too large to represent
1711-
/// in the type. In such a case, this function returns `MIN`
1712-
/// itself.
1701+
/// Wrapping (modular) division. Computes `self / other`.
1702+
/// Wrapped division on unsigned types is just normal division.
1703+
/// There's no way wrapping could ever happen.
1704+
/// This function exists, so that all operations
1705+
/// are accounted for in the wrapping operations.
17131706
///
17141707
/// # Examples
17151708
///
17161709
/// Basic usage:
17171710
///
17181711
/// ```
17191712
/// assert_eq!(100u8.wrapping_div(10), 10);
1720-
/// assert_eq!((-128i8).wrapping_div(-1), -128);
17211713
/// ```
17221714
#[stable(feature = "num_wrapping", since = "1.2.0")]
17231715
#[inline(always)]
17241716
pub fn wrapping_div(self, rhs: Self) -> Self {
1725-
self.overflowing_div(rhs).0
1717+
self / rhs
17261718
}
17271719

1728-
/// Wrapping (modular) remainder. Computes `self % other`,
1729-
/// wrapping around at the boundary of the type.
1730-
///
1731-
/// Such wrap-around never actually occurs mathematically;
1732-
/// implementation artifacts make `x % y` invalid for `MIN /
1733-
/// -1` on a signed type (where `MIN` is the negative
1734-
/// minimal value). In such a case, this function returns `0`.
1720+
/// Wrapping (modular) remainder. Computes `self % other`.
1721+
/// Wrapped remainder calculation on unsigned types is
1722+
/// just the regular remainder calculation.
1723+
/// There's no way wrapping could ever happen.
1724+
/// This function exists, so that all operations
1725+
/// are accounted for in the wrapping operations.
17351726
///
17361727
/// # Examples
17371728
///
17381729
/// Basic usage:
17391730
///
17401731
/// ```
17411732
/// assert_eq!(100i8.wrapping_rem(10), 0);
1742-
/// assert_eq!((-128i8).wrapping_rem(-1), 0);
17431733
/// ```
17441734
#[stable(feature = "num_wrapping", since = "1.2.0")]
17451735
#[inline(always)]
17461736
pub fn wrapping_rem(self, rhs: Self) -> Self {
1747-
self.overflowing_rem(rhs).0
1737+
self % rhs
17481738
}
17491739

17501740
/// Wrapping (modular) negation. Computes `-self`,
17511741
/// wrapping around at the boundary of the type.
17521742
///
1753-
/// The only case where such wrapping can occur is when one
1754-
/// negates `MIN` on a signed type (where `MIN` is the
1755-
/// negative minimal value for the type); this is a positive
1756-
/// value that is too large to represent in the type. In such
1757-
/// a case, this function returns `MIN` itself.
1743+
/// Since unsigned types do not have negative equivalents
1744+
/// all applications of this function will wrap (except for `-0`).
1745+
/// For values smaller than the corresponding signed type's maximum
1746+
/// the result is the same as casting the corresponding signed value.
1747+
/// Any larger values are equivalent to `MAX + 1 - (val - MAX - 1)` where
1748+
/// `MAX` is the corresponding signed type's maximum.
17581749
///
17591750
/// # Examples
17601751
///
17611752
/// Basic usage:
17621753
///
17631754
/// ```
1764-
/// assert_eq!(100i8.wrapping_neg(), -100);
1765-
/// assert_eq!((-128i8).wrapping_neg(), -128);
1755+
/// assert_eq!(100u8.wrapping_neg(), 156);
1756+
/// assert_eq!(0u8.wrapping_neg(), 0);
1757+
/// assert_eq!(180u8.wrapping_neg(), 76);
1758+
/// assert_eq!(180u8.wrapping_neg(), (127 + 1) - (180u8 - (127 + 1)));
17661759
/// ```
17671760
#[stable(feature = "num_wrapping", since = "1.2.0")]
17681761
#[inline(always)]
@@ -2002,7 +1995,7 @@ macro_rules! uint_impl {
20021995
/// Basic usage:
20031996
///
20041997
/// ```
2005-
/// assert_eq!(2i32.pow(4), 16);
1998+
/// assert_eq!(2u32.pow(4), 16);
20061999
/// ```
20072000
#[stable(feature = "rust1", since = "1.0.0")]
20082001
#[inline]

0 commit comments

Comments
 (0)