Skip to content

Commit 1912020

Browse files
committed
Rename core::char::Char to CharExt to match prelude guidelines.
Imports may need to be updated so this is a [breaking-change]
1 parent 01417f2 commit 1912020

File tree

11 files changed

+12
-13
lines changed

11 files changed

+12
-13
lines changed

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ mod std {
103103
mod prelude {
104104
// from core.
105105
pub use core::borrow::IntoCow;
106-
pub use core::char::Char;
106+
pub use core::char::CharExt;
107107
pub use core::clone::Clone;
108108
pub use core::cmp::{PartialEq, Eq, PartialOrd, Ord};
109109
pub use core::cmp::Ordering::{Less, Equal, Greater};

src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ use self::RecompositionState::*;
5555
use self::DecompositionType::*;
5656

5757
use core::borrow::{BorrowFrom, ToOwned};
58-
use core::char::Char;
58+
use core::char::CharExt;
5959
use core::clone::Clone;
6060
use core::iter::AdditiveIterator;
6161
use core::iter::{range, Iterator, IteratorExt};

src/libcore/char.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub fn from_digit(num: uint, radix: uint) -> Option<char> {
112112

113113
/// Basic `char` manipulations.
114114
#[stable]
115-
pub trait Char {
115+
pub trait CharExt {
116116
/// Checks if a `char` parses as a numeric digit in the given radix.
117117
///
118118
/// Compared to `is_numeric()`, this function only recognizes the characters

src/libcore/fmt/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub use self::SignificantDigits::*;
1515
pub use self::SignFormat::*;
1616

1717
use char;
18-
use char::Char;
18+
use char::CharExt;
1919
use fmt;
2020
use iter::{IteratorExt, range};
2121
use num::{cast, Float, ToPrimitive};

src/libcore/fmt/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ impl<'a> Formatter<'a> {
388388
prefix: &str,
389389
buf: &str)
390390
-> Result {
391-
use char::Char;
391+
use char::CharExt;
392392
use fmt::rt::{FlagAlternate, FlagSignPlus, FlagSignAwareZeroPad};
393393

394394
let mut width = buf.len();
@@ -504,7 +504,7 @@ impl<'a> Formatter<'a> {
504504
fn with_padding<F>(&mut self, padding: uint, default: rt::Alignment, f: F) -> Result where
505505
F: FnOnce(&mut Formatter) -> Result,
506506
{
507-
use char::Char;
507+
use char::CharExt;
508508
let align = match self.align {
509509
rt::AlignUnknown => default,
510510
_ => self.align
@@ -613,7 +613,7 @@ impl Show for str {
613613

614614
impl Show for char {
615615
fn fmt(&self, f: &mut Formatter) -> Result {
616-
use char::Char;
616+
use char::CharExt;
617617

618618
let mut utf8 = [0u8; 4];
619619
let amt = self.encode_utf8(&mut utf8).unwrap_or(0);

src/libcore/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#![stable]
1616
#![allow(missing_docs)]
1717

18-
use char::Char;
18+
use char::CharExt;
1919
use clone::Clone;
2020
use cmp::{PartialEq, Eq};
2121
use cmp::{PartialOrd, Ord};

src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub use mem::drop;
3838

3939
// Reexported types and traits
4040

41-
pub use char::Char;
41+
pub use char::CharExt;
4242
pub use clone::Clone;
4343
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
4444
pub use iter::{Extend, IteratorExt};

src/librustdoc/clean/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ use rustc::session::config;
5050
use std::rc::Rc;
5151
use std::u32;
5252
use std::str::Str as StrTrait; // Conflicts with Str variant
53-
use std::char::Char as CharTrait; // Conflicts with Char variant
5453
use std::path::Path as FsPath; // Conflicts with Path struct
5554

5655
use core::DocContext;

src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub use self::FileMode::*;
225225
pub use self::FileAccess::*;
226226
pub use self::IoErrorKind::*;
227227

228-
use char::Char;
228+
use char::CharExt;
229229
use clone::Clone;
230230
use default::Default;
231231
use error::{FromError, Error};

src/libstd/prelude/v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Reexported types and traits
2323

2424
#[stable] #[doc(no_inline)] pub use boxed::Box;
25-
#[stable] #[doc(no_inline)] pub use char::{Char, UnicodeChar};
25+
#[stable] #[doc(no_inline)] pub use char::{CharExt, UnicodeChar};
2626
#[stable] #[doc(no_inline)] pub use clone::Clone;
2727
#[stable] #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
2828
#[stable] #[doc(no_inline)] pub use iter::CloneIteratorExt;

src/libunicode/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mod u_str;
5858
/// however the converse is not always true due to the above range limits
5959
/// and, as such, should be performed via the `from_u32` function..
6060
pub mod char {
61-
pub use core::char::{MAX, from_u32, from_digit, Char};
61+
pub use core::char::{MAX, from_u32, from_digit, CharExt};
6262

6363
pub use normalize::{decompose_canonical, decompose_compatible, compose};
6464

0 commit comments

Comments
 (0)