Skip to content

Commit 4bbca92

Browse files
committed
---
yaml --- r: 191837 b: refs/heads/snap-stage3 c: a32bb1b h: refs/heads/master i: 191835: 2069362 v: v3
1 parent 09ed932 commit 4bbca92

Some content is hidden

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

93 files changed

+1981
-4305
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: 809a554fca2d0ebc2ba50077016fe282a4064752
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c225824bded695c8bced713f5a4c62fe327277bc
4+
refs/heads/snap-stage3: a32bb1bcc4c6b8806b1058c2f654415341240233
55
refs/heads/try: ce76bff75603a754d092456285ff455eb871633d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/compiletest/runtest.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,22 +1052,22 @@ fn scan_char(haystack: &str, needle: char, idx: &mut uint) -> bool {
10521052
if *idx >= haystack.len() {
10531053
return false;
10541054
}
1055-
let range = haystack.char_range_at(*idx);
1056-
if range.ch != needle {
1055+
let ch = haystack.char_at(*idx);
1056+
if ch != needle {
10571057
return false;
10581058
}
1059-
*idx = range.next;
1059+
*idx += ch.len_utf8();
10601060
return true;
10611061
}
10621062

10631063
fn scan_integer(haystack: &str, idx: &mut uint) -> bool {
10641064
let mut i = *idx;
10651065
while i < haystack.len() {
1066-
let range = haystack.char_range_at(i);
1067-
if range.ch < '0' || '9' < range.ch {
1066+
let ch = haystack.char_at(i);
1067+
if ch < '0' || '9' < ch {
10681068
break;
10691069
}
1070-
i = range.next;
1070+
i += ch.len_utf8();
10711071
}
10721072
if i == *idx {
10731073
return false;
@@ -1083,9 +1083,9 @@ fn scan_string(haystack: &str, needle: &str, idx: &mut uint) -> bool {
10831083
if haystack_i >= haystack.len() {
10841084
return false;
10851085
}
1086-
let range = haystack.char_range_at(haystack_i);
1087-
haystack_i = range.next;
1088-
if !scan_char(needle, range.ch, &mut needle_i) {
1086+
let ch = haystack.char_at(haystack_i);
1087+
haystack_i += ch.len_utf8();
1088+
if !scan_char(needle, ch, &mut needle_i) {
10891089
return false;
10901090
}
10911091
}

branches/snap-stage3/src/liballoc/boxed.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ impl BoxAny for Box<Any> {
264264
}
265265
}
266266

267-
#[cfg(not(stage0))]
268267
#[stable(feature = "rust1", since = "1.0.0")]
269268
impl BoxAny for Box<Any+Send> {
270269
#[inline]

branches/snap-stage3/src/liballoc/heap.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[cfg(stage0)]
12-
#[cfg(not(test))]
13-
use core::ptr::PtrExt;
14-
1511
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
1612

1713
/// Return a pointer to `size` bytes of memory aligned to `align`.

branches/snap-stage3/src/liballoc/rc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,6 @@ use core::nonzero::NonZero;
159159
use core::ops::{Deref, Drop};
160160
use core::option::Option;
161161
use core::option::Option::{Some, None};
162-
#[cfg(stage0)]
163-
use core::ptr::{self, PtrExt};
164-
#[cfg(not(stage0))]
165162
use core::ptr;
166163
use core::result::Result;
167164
use core::result::Result::{Ok, Err};

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ extern crate alloc;
4343
use std::cell::{Cell, RefCell};
4444
use std::cmp;
4545
use std::intrinsics;
46-
#[cfg(stage0)] // SNAP 270a677
47-
use std::intrinsics::{get_tydesc, TyDesc};
4846
use std::marker;
4947
use std::mem;
50-
#[cfg(stage0)]
51-
use std::num::{Int, UnsignedInt};
5248
use std::ptr;
5349
use std::rc::Rc;
5450
use std::rt::heap::{allocate, deallocate};
@@ -190,14 +186,12 @@ fn un_bitpack_tydesc_ptr(p: usize) -> (*const TyDesc, bool) {
190186
// HACK(eddyb) TyDesc replacement using a trait object vtable.
191187
// This could be replaced in the future with a custom DST layout,
192188
// or `&'static (drop_glue, size, align)` created by a `const fn`.
193-
#[cfg(not(stage0))] // SNAP 270a677
194189
struct TyDesc {
195190
drop_glue: fn(*const i8),
196191
size: usize,
197192
align: usize
198193
}
199194

200-
#[cfg(not(stage0))] // SNAP 270a677
201195
unsafe fn get_tydesc<T>() -> *const TyDesc {
202196
use std::raw::TraitObject;
203197

branches/snap-stage3/src/libcollections/btree/node.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ struct MutNodeSlice<'a, K: 'a, V: 'a> {
105105
/// Fails if `target_alignment` is not a power of two.
106106
#[inline]
107107
fn round_up_to_next(unrounded: usize, target_alignment: usize) -> usize {
108-
#[cfg(stage0)]
109-
use core::num::UnsignedInt;
110-
111108
assert!(target_alignment.is_power_of_two());
112109
(unrounded + target_alignment - 1) & !(target_alignment - 1)
113110
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#![feature(unique)]
3636
#![feature(unsafe_no_drop_flag)]
3737
#![feature(step_by)]
38+
#![feature(str_char)]
3839
#![cfg_attr(test, feature(rand, rustc_private, test))]
3940
#![cfg_attr(test, allow(deprecated))] // rand
4041

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

Lines changed: 3 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[cfg(stage0)]
12-
/// Creates a `Vec` containing the arguments.
13-
///
14-
/// `vec!` allows `Vec`s to be defined with the same syntax as array expressions.
15-
/// There are two forms of this macro:
16-
///
17-
/// - Create a `Vec` containing a given list of elements:
18-
///
19-
/// ```
20-
/// let v = vec![1, 2, 3];
21-
/// assert_eq!(v[0], 1);
22-
/// assert_eq!(v[1], 2);
23-
/// assert_eq!(v[2], 3);
24-
/// ```
25-
///
26-
/// - Create a `Vec` from a given element and size:
27-
///
28-
/// ```
29-
/// let v = vec![1; 3];
30-
/// assert_eq!(v, [1, 1, 1]);
31-
/// ```
32-
///
33-
/// Note that unlike array expressions this syntax supports all elements
34-
/// which implement `Clone` and the number of elements doesn't have to be
35-
/// a constant.
36-
#[macro_export]
37-
#[stable(feature = "rust1", since = "1.0.0")]
38-
macro_rules! vec {
39-
($elem:expr; $n:expr) => (
40-
$crate::vec::from_elem($elem, $n)
41-
);
42-
($($x:expr),*) => (
43-
<[_] as $crate::slice::SliceExt>::into_vec(
44-
$crate::boxed::Box::new([$($x),*]))
45-
);
46-
($($x:expr,)*) => (vec![$($x),*])
47-
}
48-
49-
#[cfg(not(stage0))]
5011
/// Creates a `Vec` containing the arguments.
5112
///
5213
/// `vec!` allows `Vec`s to be defined with the same syntax as array expressions.
@@ -84,11 +45,10 @@ macro_rules! vec {
8445
($($x:expr,)*) => (vec![$($x),*])
8546
}
8647

87-
// HACK(japaric): with cfg(test) the inherent `[T]::into_vec` method, which is required for this
88-
// macro definition, is not available. Instead use the `slice::into_vec` function which is only
89-
// available with cfg(test)
48+
// HACK(japaric): with cfg(test) the inherent `[T]::into_vec` method, which is
49+
// required for this macro definition, is not available. Instead use the
50+
// `slice::into_vec` function which is only available with cfg(test)
9051
// NB see the slice::hack module in slice.rs for more information
91-
#[cfg(not(stage0))]
9252
#[cfg(test)]
9353
macro_rules! vec {
9454
($elem:expr; $n:expr) => (

0 commit comments

Comments
 (0)