Skip to content

Commit f3746e2

Browse files
committed
---
yaml --- r: 161145 b: refs/heads/snap-stage3 c: c2aff69 h: refs/heads/master i: 161143: 655fb22 v: v3
1 parent 43fd0fd commit f3746e2

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
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: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ac2f379abb13b249aa1e630e14fa42f9415160f8
4+
refs/heads/snap-stage3: c2aff692fa88235d356725f98184a5ea5b52eb88
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ fn _arm_exec_compiled_test(config: &Config,
15661566

15671567
let mut exitcode: int = 0;
15681568
for c in exitcode_out.as_slice().chars() {
1569-
if !c.is_digit() { break; }
1569+
if !c.is_numeric() { break; }
15701570
exitcode = exitcode * 10 + match c {
15711571
'0' ... '9' => c as int - ('0' as int),
15721572
_ => 101,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ mod tests {
11891189
assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11");
11901190
let chars: &[char] = &['1', '2'];
11911191
assert_eq!("12foo1bar12".trim_left_chars(chars), "foo1bar12");
1192-
assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_digit()), "foo1bar123");
1192+
assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123");
11931193
}
11941194

11951195
#[test]
@@ -1204,7 +1204,7 @@ mod tests {
12041204
assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar");
12051205
let chars: &[char] = &['1', '2'];
12061206
assert_eq!("12foo1bar12".trim_right_chars(chars), "12foo1bar");
1207-
assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_digit()), "123foo1bar");
1207+
assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar");
12081208
}
12091209

12101210
#[test]
@@ -1219,7 +1219,7 @@ mod tests {
12191219
assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar");
12201220
let chars: &[char] = &['1', '2'];
12211221
assert_eq!("12foo1bar12".trim_chars(chars), "foo1bar");
1222-
assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_digit()), "foo1bar");
1222+
assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar");
12231223
}
12241224

12251225
#[test]

branches/snap-stage3/src/libcore/str.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ pub trait StrPrelude for Sized? {
13151315
/// let v: Vec<&str> = "Mary had a little lamb".split(' ').collect();
13161316
/// assert_eq!(v, vec!["Mary", "had", "a", "little", "lamb"]);
13171317
///
1318-
/// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_digit()).collect();
1318+
/// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_numeric()).collect();
13191319
/// assert_eq!(v, vec!["abc", "def", "ghi"]);
13201320
///
13211321
/// let v: Vec<&str> = "lionXXtigerXleopard".split('X').collect();
@@ -1336,7 +1336,7 @@ pub trait StrPrelude for Sized? {
13361336
/// let v: Vec<&str> = "Mary had a little lambda".splitn(2, ' ').collect();
13371337
/// assert_eq!(v, vec!["Mary", "had", "a little lambda"]);
13381338
///
1339-
/// let v: Vec<&str> = "abc1def2ghi".splitn(1, |c: char| c.is_digit()).collect();
1339+
/// let v: Vec<&str> = "abc1def2ghi".splitn(1, |c: char| c.is_numeric()).collect();
13401340
/// assert_eq!(v, vec!["abc", "def2ghi"]);
13411341
///
13421342
/// let v: Vec<&str> = "lionXXtigerXleopard".splitn(2, 'X').collect();
@@ -1368,7 +1368,7 @@ pub trait StrPrelude for Sized? {
13681368
/// let v: Vec<&str> = "Mary had a little lamb".split(' ').rev().collect();
13691369
/// assert_eq!(v, vec!["lamb", "little", "a", "had", "Mary"]);
13701370
///
1371-
/// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_digit()).rev().collect();
1371+
/// let v: Vec<&str> = "abc1def2ghi".split(|c: char| c.is_numeric()).rev().collect();
13721372
/// assert_eq!(v, vec!["ghi", "def", "abc"]);
13731373
///
13741374
/// let v: Vec<&str> = "lionXXtigerXleopard".split('X').rev().collect();
@@ -1386,7 +1386,7 @@ pub trait StrPrelude for Sized? {
13861386
/// let v: Vec<&str> = "Mary had a little lamb".rsplitn(2, ' ').collect();
13871387
/// assert_eq!(v, vec!["lamb", "little", "Mary had a"]);
13881388
///
1389-
/// let v: Vec<&str> = "abc1def2ghi".rsplitn(1, |c: char| c.is_digit()).collect();
1389+
/// let v: Vec<&str> = "abc1def2ghi".rsplitn(1, |c: char| c.is_numeric()).collect();
13901390
/// assert_eq!(v, vec!["ghi", "abc1def"]);
13911391
///
13921392
/// let v: Vec<&str> = "lionXXtigerXleopard".rsplitn(2, 'X').collect();
@@ -1596,7 +1596,7 @@ pub trait StrPrelude for Sized? {
15961596
/// assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar")
15971597
/// let x: &[_] = &['1', '2'];
15981598
/// assert_eq!("12foo1bar12".trim_chars(x), "foo1bar")
1599-
/// assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_digit()), "foo1bar")
1599+
/// assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_numeric()), "foo1bar")
16001600
/// ```
16011601
fn trim_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
16021602

@@ -1612,7 +1612,7 @@ pub trait StrPrelude for Sized? {
16121612
/// assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11")
16131613
/// let x: &[_] = &['1', '2'];
16141614
/// assert_eq!("12foo1bar12".trim_left_chars(x), "foo1bar12")
1615-
/// assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_digit()), "foo1bar123")
1615+
/// assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_numeric()), "foo1bar123")
16161616
/// ```
16171617
fn trim_left_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
16181618

@@ -1628,7 +1628,7 @@ pub trait StrPrelude for Sized? {
16281628
/// assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar")
16291629
/// let x: &[_] = &['1', '2'];
16301630
/// assert_eq!("12foo1bar12".trim_right_chars(x), "12foo1bar")
1631-
/// assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_digit()), "123foo1bar")
1631+
/// assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_numeric()), "123foo1bar")
16321632
/// ```
16331633
fn trim_right_chars<'a, C: CharEq>(&'a self, to_trim: C) -> &'a str;
16341634

branches/snap-stage3/src/libcoretest/char.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ fn test_is_control() {
105105

106106
#[test]
107107
fn test_is_digit() {
108-
assert!('2'.is_digit());
109-
assert!('7'.is_digit());
110-
assert!(!'c'.is_digit());
111-
assert!(!'i'.is_digit());
112-
assert!(!'z'.is_digit());
113-
assert!(!'Q'.is_digit());
108+
assert!('2'.is_numeric());
109+
assert!('7'.is_numeric());
110+
assert!(!'c'.is_numeric());
111+
assert!(!'i'.is_numeric());
112+
assert!(!'z'.is_numeric());
113+
assert!(!'Q'.is_numeric());
114114
}
115115

116116
#[test]

branches/snap-stage3/src/librustc/lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ impl NonSnakeCase {
920920
let mut allow_underscore = true;
921921
ident.chars().all(|c| {
922922
allow_underscore = match c {
923-
c if c.is_lowercase() || c.is_digit() => true,
923+
c if c.is_lowercase() || c.is_numeric() => true,
924924
'_' if allow_underscore => false,
925925
_ => return false,
926926
};

branches/snap-stage3/src/libstd/rt/backtrace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
7171
while valid {
7272
let mut i = 0;
7373
for c in chars {
74-
if c.is_digit() {
74+
if c.is_numeric() {
7575
i = i * 10 + c as uint - '0' as uint;
7676
} else {
7777
break
@@ -101,7 +101,7 @@ fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> {
101101
first = false;
102102
}
103103
let mut rest = s;
104-
while rest.char_at(0).is_digit() {
104+
while rest.char_at(0).is_numeric() {
105105
rest = rest.slice_from(1);
106106
}
107107
let i: uint = from_str(s.slice_to(s.len() - rest.len())).unwrap();

branches/snap-stage3/src/libunicode/u_char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub trait UnicodeChar {
217217
fn is_control(&self) -> bool;
218218

219219
/// Indicates whether the character is numeric (Nd, Nl, or No).
220-
fn is_digit(&self) -> bool;
220+
fn is_numeric(&self) -> bool;
221221

222222
/// Converts a character to its lowercase equivalent.
223223
///
@@ -281,7 +281,7 @@ impl UnicodeChar for char {
281281

282282
fn is_control(&self) -> bool { is_control(*self) }
283283

284-
fn is_digit(&self) -> bool { is_digit(*self) }
284+
fn is_numeric(&self) -> bool { is_digit(*self) }
285285

286286
fn to_lowercase(&self) -> char { to_lowercase(*self) }
287287

0 commit comments

Comments
 (0)