Skip to content

Commit fa9d5fa

Browse files
committed
---
yaml --- r: 191413 b: refs/heads/try c: 730defc h: refs/heads/master i: 191411: cdbf933 v: v3
1 parent 3cba372 commit fa9d5fa

Some content is hidden

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

98 files changed

+1413
-1517
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: 809a554fca2d0ebc2ba50077016fe282a4064752
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c64d671671aea2e44ee7fc6eb00ee75fc30ed7b9
5-
refs/heads/try: dda42204be8948a5f2751e5bd1b30760d56b7c24
5+
refs/heads/try: 730defc9d1c6e1a6c9724e0ea81d1df879ccd78f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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 ch = haystack.char_at(*idx);
1056-
if ch != needle {
1055+
let range = haystack.char_range_at(*idx);
1056+
if range.ch != needle {
10571057
return false;
10581058
}
1059-
*idx += ch.len_utf8();
1059+
*idx = range.next;
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 ch = haystack.char_at(i);
1067-
if ch < '0' || '9' < ch {
1066+
let range = haystack.char_range_at(i);
1067+
if range.ch < '0' || '9' < range.ch {
10681068
break;
10691069
}
1070-
i += ch.len_utf8();
1070+
i = range.next;
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 ch = haystack.char_at(haystack_i);
1087-
haystack_i += ch.len_utf8();
1088-
if !scan_char(needle, ch, &mut needle_i) {
1086+
let range = haystack.char_range_at(haystack_i);
1087+
haystack_i = range.next;
1088+
if !scan_char(needle, range.ch, &mut needle_i) {
10891089
return false;
10901090
}
10911091
}

branches/try/src/liballoc/boxed.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ pub trait BoxAny {
241241
/// Returns the boxed value if it is of type `T`, or
242242
/// `Err(Self)` if it isn't.
243243
#[stable(feature = "rust1", since = "1.0.0")]
244-
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>>;
244+
fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
245245
}
246246

247247
#[stable(feature = "rust1", since = "1.0.0")]
@@ -264,15 +264,6 @@ impl BoxAny for Box<Any> {
264264
}
265265
}
266266

267-
#[cfg(not(stage0))]
268-
#[stable(feature = "rust1", since = "1.0.0")]
269-
impl BoxAny for Box<Any+Send> {
270-
#[inline]
271-
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
272-
<Box<Any>>::downcast(self)
273-
}
274-
}
275-
276267
#[stable(feature = "rust1", since = "1.0.0")]
277268
impl<T: fmt::Display + ?Sized> fmt::Display for Box<T> {
278269
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

branches/try/src/libarena/lib.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ extern crate alloc;
4242

4343
use std::cell::{Cell, RefCell};
4444
use std::cmp;
45+
use std::intrinsics::{TyDesc, get_tydesc};
4546
use std::intrinsics;
46-
#[cfg(stage0)] // SNAP 270a677
47-
use std::intrinsics::{get_tydesc, TyDesc};
4847
use std::marker;
4948
use std::mem;
5049
#[cfg(stage0)]
@@ -187,27 +186,6 @@ fn un_bitpack_tydesc_ptr(p: usize) -> (*const TyDesc, bool) {
187186
((p & !1) as *const TyDesc, p & 1 == 1)
188187
}
189188

190-
// HACK(eddyb) TyDesc replacement using a trait object vtable.
191-
// This could be replaced in the future with a custom DST layout,
192-
// or `&'static (drop_glue, size, align)` created by a `const fn`.
193-
#[cfg(not(stage0))] // SNAP 270a677
194-
struct TyDesc {
195-
drop_glue: fn(*const i8),
196-
size: usize,
197-
align: usize
198-
}
199-
200-
#[cfg(not(stage0))] // SNAP 270a677
201-
unsafe fn get_tydesc<T>() -> *const TyDesc {
202-
use std::raw::TraitObject;
203-
204-
let ptr = &*(1 as *const T);
205-
206-
// Can use any trait that is implemented for all types.
207-
let obj = mem::transmute::<&marker::MarkerTrait, TraitObject>(ptr);
208-
obj.vtable as *const TyDesc
209-
}
210-
211189
impl<'longer_than_self> Arena<'longer_than_self> {
212190
fn chunk_size(&self) -> usize {
213191
self.copy_head.borrow().capacity()

branches/try/src/libcollections/lib.rs

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

0 commit comments

Comments
 (0)