Skip to content

Commit 7732703

Browse files
committed
---
yaml --- r: 191417 b: refs/heads/try c: 34c48db h: refs/heads/master i: 191415: c798ee1 v: v3
1 parent efbd238 commit 7732703

Some content is hidden

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

87 files changed

+1096
-1098
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: c341fe9f8cfb6d1aef6c9fb8ba7531a4c0324eef
5+
refs/heads/try: 34c48db8376dba3f5ec68b2d45bd2e9254a77792
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/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)