Skip to content

Commit f0572be

Browse files
committed
---
yaml --- r: 210879 b: refs/heads/try c: 8e82c21 h: refs/heads/master i: 210877: 7dd8070 210875: e171ca0 210871: 3ac1ffa 210863: 69a5dc3 210847: ed33a8b 210815: a3bb327 v: v3
1 parent b7d0949 commit f0572be

File tree

47 files changed

+129
-492
lines changed

Some content is hidden

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

47 files changed

+129
-492
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: d332aead906922409e54e6321fbdc774208e692f
5+
refs/heads/try: 8e82c21bf3479d338fcb8f378095daa8e698de1e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/complement-design-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ feature.
7979
A nice replacement is the [lazy constructor macro][lcm] by [Marvin
8080
Löbel][kim].
8181

82-
[fqa]: http://yosefk.com/c++fqa/ctors.html#fqa-10.12
82+
[fqa]: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003815.html
8383
[elp]: http://ericlippert.com/2013/02/06/static-constructors-part-one/
8484
[lcm]: https://gist.github.com/Kimundi/8782487
8585
[kim]: https://github.com/Kimundi

branches/try/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#![staged_api]
6565
#![crate_type = "rlib"]
6666
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
67-
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
67+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
6868
html_root_url = "http://doc.rust-lang.org/nightly/")]
6969
#![doc(test(no_crate_inject))]
7070

branches/try/src/liballoc/rc.rs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -634,18 +634,7 @@ impl<T: Default> Default for Rc<T> {
634634
}
635635

636636
#[stable(feature = "rust1", since = "1.0.0")]
637-
#[cfg(stage0)]
638637
impl<T: PartialEq> PartialEq for Rc<T> {
639-
#[inline(always)]
640-
fn eq(&self, other: &Rc<T>) -> bool { **self == **other }
641-
642-
#[inline(always)]
643-
fn ne(&self, other: &Rc<T>) -> bool { **self != **other }
644-
}
645-
646-
#[stable(feature = "rust1", since = "1.0.0")]
647-
#[cfg(not(stage0))]
648-
impl<T: ?Sized + PartialEq> PartialEq for Rc<T> {
649638
/// Equality for two `Rc<T>`s.
650639
///
651640
/// Two `Rc<T>`s are equal if their inner value are equal.
@@ -680,35 +669,10 @@ impl<T: ?Sized + PartialEq> PartialEq for Rc<T> {
680669
}
681670

682671
#[stable(feature = "rust1", since = "1.0.0")]
683-
#[cfg(stage0)]
684672
impl<T: Eq> Eq for Rc<T> {}
685-
#[stable(feature = "rust1", since = "1.0.0")]
686-
#[cfg(not(stage0))]
687-
impl<T: ?Sized + Eq> Eq for Rc<T> {}
688673

689674
#[stable(feature = "rust1", since = "1.0.0")]
690-
#[cfg(stage0)]
691675
impl<T: PartialOrd> PartialOrd for Rc<T> {
692-
#[inline(always)]
693-
fn partial_cmp(&self, other: &Rc<T>) -> Option<Ordering> {
694-
(**self).partial_cmp(&**other)
695-
}
696-
697-
#[inline(always)]
698-
fn lt(&self, other: &Rc<T>) -> bool { **self < **other }
699-
700-
#[inline(always)]
701-
fn le(&self, other: &Rc<T>) -> bool { **self <= **other }
702-
703-
#[inline(always)]
704-
fn gt(&self, other: &Rc<T>) -> bool { **self > **other }
705-
706-
#[inline(always)]
707-
fn ge(&self, other: &Rc<T>) -> bool { **self >= **other }
708-
}
709-
#[stable(feature = "rust1", since = "1.0.0")]
710-
#[cfg(not(stage0))]
711-
impl<T: ?Sized + PartialOrd> PartialOrd for Rc<T> {
712676
/// Partial comparison for two `Rc<T>`s.
713677
///
714678
/// The two are compared by calling `partial_cmp()` on their inner values.
@@ -793,14 +757,7 @@ impl<T: ?Sized + PartialOrd> PartialOrd for Rc<T> {
793757
}
794758

795759
#[stable(feature = "rust1", since = "1.0.0")]
796-
#[cfg(stage0)]
797760
impl<T: Ord> Ord for Rc<T> {
798-
#[inline]
799-
fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
800-
}
801-
#[stable(feature = "rust1", since = "1.0.0")]
802-
#[cfg(not(stage0))]
803-
impl<T: ?Sized + Ord> Ord for Rc<T> {
804761
/// Comparison for two `Rc<T>`s.
805762
///
806763
/// The two are compared by calling `cmp()` on their inner values.
@@ -1442,9 +1399,4 @@ mod tests {
14421399
assert_eq!(format!("{:?}", foo), "75");
14431400
}
14441401

1445-
#[test]
1446-
fn test_unsized() {
1447-
let foo: Rc<[i32]> = Rc::new([1, 2, 3]);
1448-
assert_eq!(foo, foo.clone());
1449-
}
14501402
}

branches/try/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#![crate_type = "rlib"]
2828
#![crate_type = "dylib"]
2929
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
30-
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
30+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
3131
html_root_url = "http://doc.rust-lang.org/nightly/")]
3232

3333
#![feature(alloc)]

branches/try/src/libcollections/borrow.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,10 @@ impl<'a, T: ?Sized> BorrowMut<T> for &'a mut T {
116116
fn borrow_mut(&mut self) -> &mut T { &mut **self }
117117
}
118118

119-
#[cfg(stage0)]
120119
impl<T> Borrow<T> for rc::Rc<T> {
121120
fn borrow(&self) -> &T { &**self }
122121
}
123122

124-
#[cfg(not(stage0))]
125-
impl<T: ?Sized> Borrow<T> for rc::Rc<T> {
126-
fn borrow(&self) -> &T { &**self }
127-
}
128-
129123
impl<T> Borrow<T> for arc::Arc<T> {
130124
fn borrow(&self) -> &T { &**self }
131125
}

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

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pub use self::TraversalItem::*;
1919
use core::prelude::*;
2020

2121
use core::cmp::Ordering::{Greater, Less, Equal};
22-
#[cfg(not(stage0))]
23-
use core::intrinsics::arith_offset;
2422
use core::iter::Zip;
2523
use core::marker::PhantomData;
2624
use core::ops::{Deref, DerefMut, Index, IndexMut};
@@ -207,7 +205,6 @@ impl<T> RawItems<T> {
207205
RawItems::from_parts(slice.as_ptr(), slice.len())
208206
}
209207

210-
#[cfg(stage0)]
211208
unsafe fn from_parts(ptr: *const T, len: usize) -> RawItems<T> {
212209
if mem::size_of::<T>() == 0 {
213210
RawItems {
@@ -222,22 +219,6 @@ impl<T> RawItems<T> {
222219
}
223220
}
224221

225-
#[cfg(not(stage0))]
226-
unsafe fn from_parts(ptr: *const T, len: usize) -> RawItems<T> {
227-
if mem::size_of::<T>() == 0 {
228-
RawItems {
229-
head: ptr,
230-
tail: arith_offset(ptr as *const i8, len as isize) as *const T,
231-
}
232-
} else {
233-
RawItems {
234-
head: ptr,
235-
tail: ptr.offset(len as isize),
236-
}
237-
}
238-
}
239-
240-
#[cfg(stage0)]
241222
unsafe fn push(&mut self, val: T) {
242223
ptr::write(self.tail as *mut T, val);
243224

@@ -247,23 +228,11 @@ impl<T> RawItems<T> {
247228
self.tail = self.tail.offset(1);
248229
}
249230
}
250-
251-
#[cfg(not(stage0))]
252-
unsafe fn push(&mut self, val: T) {
253-
ptr::write(self.tail as *mut T, val);
254-
255-
if mem::size_of::<T>() == 0 {
256-
self.tail = arith_offset(self.tail as *const i8, 1) as *const T;
257-
} else {
258-
self.tail = self.tail.offset(1);
259-
}
260-
}
261231
}
262232

263233
impl<T> Iterator for RawItems<T> {
264234
type Item = T;
265235

266-
#[cfg(stage0)]
267236
fn next(&mut self) -> Option<T> {
268237
if self.head == self.tail {
269238
None
@@ -281,29 +250,9 @@ impl<T> Iterator for RawItems<T> {
281250
}
282251
}
283252
}
284-
285-
#[cfg(not(stage0))]
286-
fn next(&mut self) -> Option<T> {
287-
if self.head == self.tail {
288-
None
289-
} else {
290-
unsafe {
291-
let ret = Some(ptr::read(self.head));
292-
293-
if mem::size_of::<T>() == 0 {
294-
self.head = arith_offset(self.head as *const i8, 1) as *const T;
295-
} else {
296-
self.head = self.head.offset(1);
297-
}
298-
299-
ret
300-
}
301-
}
302-
}
303253
}
304254

305255
impl<T> DoubleEndedIterator for RawItems<T> {
306-
#[cfg(stage0)]
307256
fn next_back(&mut self) -> Option<T> {
308257
if self.head == self.tail {
309258
None
@@ -319,23 +268,6 @@ impl<T> DoubleEndedIterator for RawItems<T> {
319268
}
320269
}
321270
}
322-
323-
#[cfg(not(stage0))]
324-
fn next_back(&mut self) -> Option<T> {
325-
if self.head == self.tail {
326-
None
327-
} else {
328-
unsafe {
329-
if mem::size_of::<T>() == 0 {
330-
self.tail = arith_offset(self.tail as *const i8, -1) as *const T;
331-
} else {
332-
self.tail = self.tail.offset(-1);
333-
}
334-
335-
Some(ptr::read(self.tail))
336-
}
337-
}
338-
}
339271
}
340272

341273
impl<T> Drop for RawItems<T> {

branches/try/src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#![staged_api]
2020
#![crate_type = "rlib"]
2121
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22-
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
22+
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2323
html_root_url = "http://doc.rust-lang.org/nightly/",
2424
html_playground_url = "http://play.rust-lang.org/")]
2525
#![doc(test(no_crate_inject))]

branches/try/src/libcollections/vec.rs

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ use core::cmp::Ordering;
6666
use core::fmt;
6767
use core::hash::{self, Hash};
6868
use core::intrinsics::assume;
69-
#[cfg(not(stage0))]
70-
use core::intrinsics::arith_offset;
7169
use core::iter::{repeat, FromIterator};
7270
use core::marker::PhantomData;
7371
use core::mem;
@@ -1529,7 +1527,6 @@ impl<T> IntoIterator for Vec<T> {
15291527
/// }
15301528
/// ```
15311529
#[inline]
1532-
#[cfg(stage0)]
15331530
fn into_iter(self) -> IntoIter<T> {
15341531
unsafe {
15351532
let ptr = *self.ptr;
@@ -1545,24 +1542,6 @@ impl<T> IntoIterator for Vec<T> {
15451542
IntoIter { allocation: ptr, cap: cap, ptr: begin, end: end }
15461543
}
15471544
}
1548-
1549-
#[inline]
1550-
#[cfg(not(stage0))]
1551-
fn into_iter(self) -> IntoIter<T> {
1552-
unsafe {
1553-
let ptr = *self.ptr;
1554-
assume(!ptr.is_null());
1555-
let cap = self.cap;
1556-
let begin = ptr as *const T;
1557-
let end = if mem::size_of::<T>() == 0 {
1558-
arith_offset(ptr as *const i8, self.len() as isize) as *const T
1559-
} else {
1560-
ptr.offset(self.len() as isize) as *const T
1561-
};
1562-
mem::forget(self);
1563-
IntoIter { allocation: ptr, cap: cap, ptr: begin, end: end }
1564-
}
1565-
}
15661545
}
15671546

15681547
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1767,7 +1746,6 @@ impl<T> Iterator for IntoIter<T> {
17671746
type Item = T;
17681747

17691748
#[inline]
1770-
#[cfg(stage0)]
17711749
fn next(&mut self) -> Option<T> {
17721750
unsafe {
17731751
if self.ptr == self.end {
@@ -1791,31 +1769,6 @@ impl<T> Iterator for IntoIter<T> {
17911769
}
17921770
}
17931771

1794-
#[inline]
1795-
#[cfg(not(stage0))]
1796-
fn next(&mut self) -> Option<T> {
1797-
unsafe {
1798-
if self.ptr == self.end {
1799-
None
1800-
} else {
1801-
if mem::size_of::<T>() == 0 {
1802-
// purposefully don't use 'ptr.offset' because for
1803-
// vectors with 0-size elements this would return the
1804-
// same pointer.
1805-
self.ptr = arith_offset(self.ptr as *const i8, 1) as *const T;
1806-
1807-
// Use a non-null pointer value
1808-
Some(ptr::read(EMPTY as *mut T))
1809-
} else {
1810-
let old = self.ptr;
1811-
self.ptr = self.ptr.offset(1);
1812-
1813-
Some(ptr::read(old))
1814-
}
1815-
}
1816-
}
1817-
}
1818-
18191772
#[inline]
18201773
fn size_hint(&self) -> (usize, Option<usize>) {
18211774
let diff = (self.end as usize) - (self.ptr as usize);
@@ -1833,7 +1786,6 @@ impl<T> Iterator for IntoIter<T> {
18331786
#[stable(feature = "rust1", since = "1.0.0")]
18341787
impl<T> DoubleEndedIterator for IntoIter<T> {
18351788
#[inline]
1836-
#[cfg(stage0)]
18371789
fn next_back(&mut self) -> Option<T> {
18381790
unsafe {
18391791
if self.end == self.ptr {
@@ -1853,28 +1805,6 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
18531805
}
18541806
}
18551807
}
1856-
1857-
#[inline]
1858-
#[cfg(not(stage0))]
1859-
fn next_back(&mut self) -> Option<T> {
1860-
unsafe {
1861-
if self.end == self.ptr {
1862-
None
1863-
} else {
1864-
if mem::size_of::<T>() == 0 {
1865-
// See above for why 'ptr.offset' isn't used
1866-
self.end = arith_offset(self.end as *const i8, -1) as *const T;
1867-
1868-
// Use a non-null pointer value
1869-
Some(ptr::read(EMPTY as *mut T))
1870-
} else {
1871-
self.end = self.end.offset(-1);
1872-
1873-
Some(ptr::read(mem::transmute(self.end)))
1874-
}
1875-
}
1876-
}
1877-
}
18781808
}
18791809

18801810
#[stable(feature = "rust1", since = "1.0.0")]

branches/try/src/libcore/intrinsics.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,20 +283,6 @@ extern "rust-intrinsic" {
283283
/// returned value will result in undefined behavior.
284284
pub fn offset<T>(dst: *const T, offset: isize) -> *const T;
285285

286-
/// Calculates the offset from a pointer, potentially wrapping.
287-
///
288-
/// This is implemented as an intrinsic to avoid converting to and from an
289-
/// integer, since the conversion inhibits certain optimizations.
290-
///
291-
/// # Safety
292-
///
293-
/// Unlike the `offset` intrinsic, this intrinsic does not restrict the
294-
/// resulting pointer to point into or one byte past the end of an allocated
295-
/// object, and it wraps with two's complement arithmetic. The resulting
296-
/// value is not necessarily valid to be used to actually access memory.
297-
#[cfg(not(stage0))]
298-
pub fn arith_offset<T>(dst: *const T, offset: isize) -> *const T;
299-
300286
/// Copies `count * size_of<T>` bytes from `src` to `dst`. The source
301287
/// and destination may *not* overlap.
302288
///

0 commit comments

Comments
 (0)