Skip to content

Commit 9e28673

Browse files
committed
---
yaml --- r: 186107 b: refs/heads/try c: 597b4fa h: refs/heads/master i: 186105: 51bba93 186103: e8a3b8f v: v3
1 parent 845ec92 commit 9e28673

File tree

100 files changed

+413
-662
lines changed

Some content is hidden

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

100 files changed

+413
-662
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: b4c965ee803a4521d8b4575f634e036f93e408f3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
5-
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77
5+
refs/heads/try: 597b4fa984d866154f5e23244a4a48c787af43fd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/trpl/unsafe.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,10 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
576576
#[lang = "eh_personality"] extern fn eh_personality() {}
577577
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }
578578
# fn main() {}
579+
# mod std { // for-loops
580+
# pub use core::iter;
581+
# pub use core::option;
582+
# }
579583
```
580584

581585
Note that there is one extra lang item here which differs from the examples

branches/try/src/liballoc/arc.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
//!
4040
//! let five = Arc::new(5);
4141
//!
42-
//! for _ in 0..10 {
42+
//! for _ in 0u..10 {
4343
//! let five = five.clone();
4444
//!
4545
//! Thread::spawn(move || {
@@ -56,7 +56,7 @@
5656
//!
5757
//! let five = Arc::new(Mutex::new(5));
5858
//!
59-
//! for _ in 0..10 {
59+
//! for _ in 0u..10 {
6060
//! let five = five.clone();
6161
//!
6262
//! Thread::spawn(move || {
@@ -101,7 +101,7 @@ use heap::deallocate;
101101
/// let numbers: Vec<_> = (0..100u32).map(|i| i as f32).collect();
102102
/// let shared_numbers = Arc::new(numbers);
103103
///
104-
/// for _ in 0..10 {
104+
/// for _ in 0u..10 {
105105
/// let child_numbers = shared_numbers.clone();
106106
///
107107
/// Thread::spawn(move || {
@@ -661,7 +661,7 @@ mod tests {
661661

662662
#[test]
663663
fn test_cowarc_clone_make_unique() {
664-
let mut cow0 = Arc::new(75);
664+
let mut cow0 = Arc::new(75u);
665665
let mut cow1 = cow0.clone();
666666
let mut cow2 = cow1.clone();
667667

@@ -685,7 +685,7 @@ mod tests {
685685

686686
#[test]
687687
fn test_cowarc_clone_unique2() {
688-
let mut cow0 = Arc::new(75);
688+
let mut cow0 = Arc::new(75u);
689689
let cow1 = cow0.clone();
690690
let cow2 = cow1.clone();
691691

@@ -708,7 +708,7 @@ mod tests {
708708

709709
#[test]
710710
fn test_cowarc_clone_weak() {
711-
let mut cow0 = Arc::new(75);
711+
let mut cow0 = Arc::new(75u);
712712
let cow1_weak = cow0.downgrade();
713713

714714
assert!(75 == *cow0);

branches/try/src/liballoc/boxed_test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ struct Test;
3131

3232
#[test]
3333
fn any_move() {
34-
let a = Box::new(8us) as Box<Any>;
34+
let a = Box::new(8u) as Box<Any>;
3535
let b = Box::new(Test) as Box<Any>;
3636

3737
match a.downcast::<uint>() {
38-
Ok(a) => { assert!(a == Box::new(8us)); }
38+
Ok(a) => { assert!(a == Box::new(8u)); }
3939
Err(..) => panic!()
4040
}
4141
match b.downcast::<Test>() {
4242
Ok(a) => { assert!(a == Box::new(Test)); }
4343
Err(..) => panic!()
4444
}
4545

46-
let a = Box::new(8) as Box<Any>;
46+
let a = Box::new(8u) as Box<Any>;
4747
let b = Box::new(Test) as Box<Any>;
4848

4949
assert!(a.downcast::<Box<Test>>().is_err());
@@ -52,14 +52,14 @@ fn any_move() {
5252

5353
#[test]
5454
fn test_show() {
55-
let a = Box::new(8) as Box<Any>;
55+
let a = Box::new(8u) as Box<Any>;
5656
let b = Box::new(Test) as Box<Any>;
5757
let a_str = format!("{:?}", a);
5858
let b_str = format!("{:?}", b);
5959
assert_eq!(a_str, "Box<Any>");
6060
assert_eq!(b_str, "Box<Any>");
6161

62-
static EIGHT: usize = 8;
62+
static EIGHT: usize = 8us;
6363
static TEST: Test = Test;
6464
let a = &EIGHT as &Any;
6565
let b = &TEST as &Any;

branches/try/src/liballoc/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ pub fn oom() -> ! {
124124
#[doc(hidden)]
125125
pub fn fixme_14344_be_sure_to_link_to_collections() {}
126126

127-
// NOTE: remove after next snapshot
128-
#[cfg(all(stage0, not(test)))]
127+
#[cfg(not(test))]
129128
#[doc(hidden)]
130129
mod std {
131130
pub use core::fmt;

branches/try/src/liballoc/rc.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
266266
/// ```
267267
/// use std::rc::{self, Rc};
268268
///
269-
/// let x = Rc::new(3);
270-
/// assert_eq!(rc::try_unwrap(x), Ok(3));
269+
/// let x = Rc::new(3u);
270+
/// assert_eq!(rc::try_unwrap(x), Ok(3u));
271271
///
272-
/// let x = Rc::new(4);
272+
/// let x = Rc::new(4u);
273273
/// let _y = x.clone();
274-
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4)));
274+
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u)));
275275
/// ```
276276
#[inline]
277277
#[unstable(feature = "alloc")]
@@ -300,9 +300,9 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
300300
/// ```
301301
/// use std::rc::{self, Rc};
302302
///
303-
/// let mut x = Rc::new(3);
304-
/// *rc::get_mut(&mut x).unwrap() = 4;
305-
/// assert_eq!(*x, 4);
303+
/// let mut x = Rc::new(3u);
304+
/// *rc::get_mut(&mut x).unwrap() = 4u;
305+
/// assert_eq!(*x, 4u);
306306
///
307307
/// let _y = x.clone();
308308
/// assert!(rc::get_mut(&mut x).is_none());
@@ -845,7 +845,7 @@ mod tests {
845845

846846
#[test]
847847
fn is_unique() {
848-
let x = Rc::new(3);
848+
let x = Rc::new(3u);
849849
assert!(super::is_unique(&x));
850850
let y = x.clone();
851851
assert!(!super::is_unique(&x));
@@ -893,21 +893,21 @@ mod tests {
893893

894894
#[test]
895895
fn try_unwrap() {
896-
let x = Rc::new(3);
897-
assert_eq!(super::try_unwrap(x), Ok(3));
898-
let x = Rc::new(4);
896+
let x = Rc::new(3u);
897+
assert_eq!(super::try_unwrap(x), Ok(3u));
898+
let x = Rc::new(4u);
899899
let _y = x.clone();
900-
assert_eq!(super::try_unwrap(x), Err(Rc::new(4)));
901-
let x = Rc::new(5);
900+
assert_eq!(super::try_unwrap(x), Err(Rc::new(4u)));
901+
let x = Rc::new(5u);
902902
let _w = x.downgrade();
903-
assert_eq!(super::try_unwrap(x), Err(Rc::new(5)));
903+
assert_eq!(super::try_unwrap(x), Err(Rc::new(5u)));
904904
}
905905

906906
#[test]
907907
fn get_mut() {
908-
let mut x = Rc::new(3);
909-
*super::get_mut(&mut x).unwrap() = 4;
910-
assert_eq!(*x, 4);
908+
let mut x = Rc::new(3u);
909+
*super::get_mut(&mut x).unwrap() = 4u;
910+
assert_eq!(*x, 4u);
911911
let y = x.clone();
912912
assert!(super::get_mut(&mut x).is_none());
913913
drop(y);
@@ -918,7 +918,7 @@ mod tests {
918918

919919
#[test]
920920
fn test_cowrc_clone_make_unique() {
921-
let mut cow0 = Rc::new(75);
921+
let mut cow0 = Rc::new(75u);
922922
let mut cow1 = cow0.clone();
923923
let mut cow2 = cow1.clone();
924924

@@ -942,7 +942,7 @@ mod tests {
942942

943943
#[test]
944944
fn test_cowrc_clone_unique2() {
945-
let mut cow0 = Rc::new(75);
945+
let mut cow0 = Rc::new(75u);
946946
let cow1 = cow0.clone();
947947
let cow2 = cow1.clone();
948948

@@ -965,7 +965,7 @@ mod tests {
965965

966966
#[test]
967967
fn test_cowrc_clone_weak() {
968-
let mut cow0 = Rc::new(75);
968+
let mut cow0 = Rc::new(75u);
969969
let cow1_weak = cow0.downgrade();
970970

971971
assert!(75 == *cow0);
@@ -979,7 +979,7 @@ mod tests {
979979

980980
#[test]
981981
fn test_show() {
982-
let foo = Rc::new(75);
982+
let foo = Rc::new(75u);
983983
assert_eq!(format!("{:?}", foo), "75");
984984
}
985985

branches/try/src/libcollections/lib.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,15 @@ pub fn fixme_14344_be_sure_to_link_to_collections() {}
109109

110110
#[cfg(not(test))]
111111
mod std {
112-
// NOTE: remove after next snapshot
113-
#[cfg(stage0)] pub use core::clone; // derive(Clone)
114-
#[cfg(stage0)] pub use core::cmp; // derive(Eq, Ord, etc.)
115-
#[cfg(stage0)] pub use core::marker; // derive(Copy)
116-
#[cfg(stage0)] pub use core::hash; // derive(Hash)
117-
#[cfg(stage0)] pub use core::iter;
118-
#[cfg(stage0)] pub use core::fmt; // necessary for panic!()
119-
#[cfg(stage0)] pub use core::option; // necessary for panic!()
120-
112+
pub use core::fmt; // necessary for panic!()
113+
pub use core::option; // necessary for panic!()
114+
pub use core::clone; // derive(Clone)
115+
pub use core::cmp; // derive(Eq, Ord, etc.)
116+
pub use core::marker; // derive(Copy)
117+
pub use core::hash; // derive(Hash)
121118
pub use core::ops; // RangeFull
119+
// for-loops
120+
pub use core::iter;
122121
}
123122

124123
#[cfg(test)]

branches/try/src/libcollections/macros.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,3 @@ macro_rules! vec {
2222
);
2323
($($x:expr,)*) => (vec![$($x),*])
2424
}
25-
26-
/// Use the syntax described in `std::fmt` to create a value of type `String`.
27-
/// See `std::fmt` for more information.
28-
///
29-
/// # Example
30-
///
31-
/// ```
32-
/// format!("test");
33-
/// format!("hello {}", "world!");
34-
/// format!("x = {}, y = {y}", 10, y = 30);
35-
/// ```
36-
#[macro_export]
37-
#[stable(feature = "rust1", since = "1.0.0")]
38-
macro_rules! format {
39-
($($arg:tt)*) => ($crate::string::String::format(format_args!($($arg)*)))
40-
}

branches/try/src/libcollections/ring_buf.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ use core::ops::{Index, IndexMut};
2727
use core::ptr;
2828
use core::raw::Slice as RawSlice;
2929

30-
use core::hash::{Writer, Hash, Hasher};
31-
use core::cmp;
30+
use std::hash::{Writer, Hash, Hasher};
31+
use std::cmp;
3232

3333
use alloc::heap;
3434

branches/try/src/libcollections/string.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -671,29 +671,6 @@ impl String {
671671
pub fn clear(&mut self) {
672672
self.vec.clear()
673673
}
674-
675-
/// The format function takes a precompiled format string and a list of
676-
/// arguments, to return the resulting formatted string.
677-
///
678-
/// # Arguments
679-
///
680-
/// * args - a structure of arguments generated via the `format_args!` macro.
681-
///
682-
/// # Example
683-
///
684-
/// ```rust
685-
/// let s = String::format(format_args!("Hello, {}!", "world"));
686-
/// assert_eq!(s, "Hello, world!".to_string());
687-
/// ```
688-
#[unstable(feature = "collections",
689-
reason = "duplicates std::fmt::format, only needed when libstd is missing")]
690-
pub fn format(args: fmt::Arguments) -> String {
691-
// FIXME #21826
692-
use core::fmt::Writer;
693-
let mut output = String::new();
694-
let _ = write!(&mut output, "{}", args);
695-
output
696-
}
697674
}
698675

699676
impl FromUtf8Error {
@@ -1371,12 +1348,6 @@ mod tests {
13711348
assert_eq!(s, d);
13721349
}
13731350

1374-
#[test]
1375-
fn test_format() {
1376-
let s = format_args!(String::format, "Hello, {}!", "world");
1377-
assert_eq!(s.as_slice(), "Hello, world!");
1378-
}
1379-
13801351
#[bench]
13811352
fn bench_with_capacity(b: &mut Bencher) {
13821353
b.iter(|| {

branches/try/src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ use num::{ToPrimitive, Int};
6767
use ops::{Add, Deref, FnMut};
6868
use option::Option;
6969
use option::Option::{Some, None};
70-
use marker::Sized;
70+
use std::marker::Sized;
7171
use usize;
7272

7373
/// An interface for dealing with "external iterators". These types of iterators

branches/try/src/libcore/lib.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,17 @@ mod array;
149149
mod core {
150150
pub use panicking;
151151
pub use fmt;
152-
#[cfg(not(stage0))] pub use clone;
153-
#[cfg(not(stage0))] pub use cmp;
154-
#[cfg(not(stage0))] pub use hash;
155-
#[cfg(not(stage0))] pub use marker;
156-
#[cfg(not(stage0))] pub use option;
157-
#[cfg(not(stage0))] pub use iter;
158152
}
159153

160154
#[doc(hidden)]
161155
mod std {
162-
// NOTE: remove after next snapshot
163-
#[cfg(stage0)] pub use clone;
164-
#[cfg(stage0)] pub use cmp;
165-
#[cfg(stage0)] pub use hash;
166-
#[cfg(stage0)] pub use marker;
167-
#[cfg(stage0)] pub use option;
168-
#[cfg(stage0)] pub use fmt;
169-
#[cfg(stage0)] pub use iter;
170-
171-
// range syntax
156+
pub use clone;
157+
pub use cmp;
158+
pub use fmt;
159+
pub use hash;
160+
pub use marker;
172161
pub use ops;
162+
pub use option;
163+
// for-loops
164+
pub use iter;
173165
}

branches/try/src/liblibc/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5101,9 +5101,8 @@ pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen corre
51015101

51025102
#[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows
51035103

5104-
// NOTE: remove after next snapshot
51055104
#[doc(hidden)]
5106-
#[cfg(all(stage0, not(test)))]
5105+
#[cfg(not(test))]
51075106
mod std {
51085107
pub use core::marker;
51095108
}

branches/try/src/librand/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,7 @@ pub struct Open01<F>(pub F);
493493
/// ```
494494
pub struct Closed01<F>(pub F);
495495

496-
// NOTE: remove after next snapshot
497-
#[cfg(all(stage0, not(test)))]
496+
#[cfg(not(test))]
498497
mod std {
499498
pub use core::{option, fmt}; // panic!()
500499
pub use core::clone; // derive Clone

0 commit comments

Comments
 (0)