Skip to content

Commit 01bce3d

Browse files
committed
---
yaml --- r: 114668 b: refs/heads/auto c: 7192452 h: refs/heads/master v: v3
1 parent 9428ccd commit 01bce3d

File tree

4 files changed

+17
-4
lines changed

4 files changed

+17
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: d9708539afa16bf233332fee846cc9c6d7344517
16+
refs/heads/auto: 71924525458e508be139d76f48b34e64a5a9dca3
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libstd/char.rs renamed to branches/auto/src/libcore/char.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@
2727
use cast::transmute;
2828
use option::{None, Option, Some};
2929
use iter::{Iterator, range_step};
30-
use str::StrSlice;
3130
use unicode::{derived_property, property, general_category, decompose, conversions};
3231

3332
#[cfg(test)] use str::Str;
3433
#[cfg(test)] use strbuf::StrBuf;
3534
#[cfg(test)] use slice::ImmutableVector;
3635

37-
#[cfg(not(test))] use cmp::{Eq, Ord};
36+
#[cfg(not(test))] use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering};
3837
#[cfg(not(test))] use default::Default;
3938

4039
// UTF-8 ranges and tags for encoding characters
@@ -659,12 +658,22 @@ impl Eq for char {
659658
fn eq(&self, other: &char) -> bool { (*self) == (*other) }
660659
}
661660

661+
#[cfg(not(test))]
662+
impl TotalEq for char {}
663+
662664
#[cfg(not(test))]
663665
impl Ord for char {
664666
#[inline]
665667
fn lt(&self, other: &char) -> bool { *self < *other }
666668
}
667669

670+
#[cfg(not(test))]
671+
impl TotalOrd for char {
672+
fn cmp(&self, other: &char) -> Ordering {
673+
(*self as u32).cmp(&(*other as u32))
674+
}
675+
}
676+
668677
#[cfg(not(test))]
669678
impl Default for char {
670679
#[inline]

branches/auto/src/libcore/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ pub mod kinds;
3434
pub mod ops;
3535
pub mod ty;
3636
pub mod container;
37+
38+
/* Core types and methods on primitives */
39+
40+
pub mod char;

branches/auto/src/libstd/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ extern crate core;
138138
#[cfg(not(test))] pub use ty = core::ty;
139139

140140
pub use core::cast;
141+
pub use core::char;
141142
pub use core::container;
142143
pub use core::intrinsics;
143144
pub use core::mem;
@@ -188,7 +189,6 @@ pub mod prelude;
188189

189190
pub mod unit;
190191
pub mod bool;
191-
pub mod char;
192192
pub mod tuple;
193193

194194
pub mod slice;

0 commit comments

Comments
 (0)