Skip to content

Commit 1afc883

Browse files
committed
---
yaml --- r: 193914 b: refs/heads/beta c: 71982c2 h: refs/heads/master v: v3
1 parent a18047f commit 1afc883

Some content is hidden

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

91 files changed

+1315
-1293
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 51bc2f1f37961a4a5f252759704b4a095bb05ee9
34+
refs/heads/beta: 71982c21245489fd316fc9e82bf7bec4b09d45a6
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/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/beta/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/beta/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)