diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-08-06 23:03:31 -0700 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-08-07 22:41:12 -0400 |
| commit | e99eff172a11816f335153147dd0800fc4877bee (patch) | |
| tree | 5579273b59f513437a40cd0f47205b49df434559 /src/libstd | |
| parent | 8964fcc5ac9cefcc55ea071142c3c81d623a52be (diff) | |
| download | rust-e99eff172a11816f335153147dd0800fc4877bee.tar.gz rust-e99eff172a11816f335153147dd0800fc4877bee.zip | |
Forbid `priv` where it has no effect
This is everywhere except struct fields and enum variants.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/comm.rs | 8 | ||||
| -rw-r--r-- | src/libstd/num/strconv.rs | 6 | ||||
| -rw-r--r-- | src/libstd/run.rs | 6 | ||||
| -rw-r--r-- | src/libstd/str.rs | 20 | ||||
| -rw-r--r-- | src/libstd/str/ascii.rs | 6 |
5 files changed, 23 insertions, 23 deletions
diff --git a/src/libstd/comm.rs b/src/libstd/comm.rs index 4356f1143da..a4de10f8c77 100644 --- a/src/libstd/comm.rs +++ b/src/libstd/comm.rs @@ -314,7 +314,7 @@ mod pipesy { #[allow(non_camel_case_types)] pub mod oneshot { - priv use std::kinds::Send; + use std::kinds::Send; use ptr::to_mut_unsafe_ptr; pub fn init<T: Send>() -> (server::Oneshot<T>, client::Oneshot<T>) { @@ -341,7 +341,7 @@ mod pipesy { #[allow(non_camel_case_types)] pub mod client { - priv use std::kinds::Send; + use std::kinds::Send; #[allow(non_camel_case_types)] pub fn try_send<T: Send>(pipe: Oneshot<T>, x_0: T) -> @@ -489,7 +489,7 @@ mod pipesy { #[allow(non_camel_case_types)] pub mod streamp { - priv use std::kinds::Send; + use std::kinds::Send; pub fn init<T: Send>() -> (server::Open<T>, client::Open<T>) { pub use std::pipes::HasBuffer; @@ -501,7 +501,7 @@ mod pipesy { #[allow(non_camel_case_types)] pub mod client { - priv use std::kinds::Send; + use std::kinds::Send; #[allow(non_camel_case_types)] pub fn try_data<T: Send>(pipe: Open<T>, x_0: T) -> diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 7ab3c81b61f..1f22343ad9c 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -422,9 +422,9 @@ pub fn float_to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Float+Round+ // Some constants for from_str_bytes_common's input validation, // they define minimum radix values for which the character is a valid digit. -priv static DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u; -priv static DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u; -priv static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u; +static DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u; +static DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u; +static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u; /** * Parses a byte slice as a number. This is meant to diff --git a/src/libstd/run.rs b/src/libstd/run.rs index 694aa672af7..99cf96eaae2 100644 --- a/src/libstd/run.rs +++ b/src/libstd/run.rs @@ -761,14 +761,14 @@ fn with_dirp<T>(d: Option<&Path>, } #[cfg(windows)] -priv fn free_handle(handle: *()) { +fn free_handle(handle: *()) { unsafe { libc::funcs::extra::kernel32::CloseHandle(cast::transmute(handle)); } } #[cfg(unix)] -priv fn free_handle(_handle: *()) { +fn free_handle(_handle: *()) { // unix has no process handle object, just a pid } @@ -823,7 +823,7 @@ pub fn process_output(prog: &str, args: &[~str]) -> ProcessOutput { * operate on a none-existant process or, even worse, on a newer process * with the same id. */ -priv fn waitpid(pid: pid_t) -> int { +fn waitpid(pid: pid_t) -> int { return waitpid_os(pid); #[cfg(windows)] diff --git a/src/libstd/str.rs b/src/libstd/str.rs index c4bd2c5435a..fa75916fb86 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -738,7 +738,7 @@ pub fn count_bytes<'b>(s: &'b str, start: uint, n: uint) -> uint { } // https://tools.ietf.org/html/rfc3629 -priv static UTF8_CHAR_WIDTH: [u8, ..256] = [ +static UTF8_CHAR_WIDTH: [u8, ..256] = [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, @@ -781,15 +781,15 @@ macro_rules! utf8_acc_cont_byte( ) // UTF-8 tags and ranges -priv static TAG_CONT_U8: u8 = 128u8; -priv static TAG_CONT: uint = 128u; -priv static MAX_ONE_B: uint = 128u; -priv static TAG_TWO_B: uint = 192u; -priv static MAX_TWO_B: uint = 2048u; -priv static TAG_THREE_B: uint = 224u; -priv static MAX_THREE_B: uint = 65536u; -priv static TAG_FOUR_B: uint = 240u; -priv static MAX_UNICODE: uint = 1114112u; +static TAG_CONT_U8: u8 = 128u8; +static TAG_CONT: uint = 128u; +static MAX_ONE_B: uint = 128u; +static TAG_TWO_B: uint = 192u; +static MAX_TWO_B: uint = 2048u; +static TAG_THREE_B: uint = 224u; +static MAX_THREE_B: uint = 65536u; +static TAG_FOUR_B: uint = 240u; +static MAX_UNICODE: uint = 1114112u; /// Unsafe operations pub mod raw { diff --git a/src/libstd/str/ascii.rs b/src/libstd/str/ascii.rs index 1be4d07dfa4..6ededb02107 100644 --- a/src/libstd/str/ascii.rs +++ b/src/libstd/str/ascii.rs @@ -274,7 +274,7 @@ pub fn to_ascii_lower(string: &str) -> ~str { } #[inline] -priv fn map_bytes(string: &str, map: &'static [u8]) -> ~str { +fn map_bytes(string: &str, map: &'static [u8]) -> ~str { let len = string.len(); let mut result = str::with_capacity(len); unsafe { @@ -298,7 +298,7 @@ pub fn eq_ignore_ascii_case(a: &str, b: &str) -> bool { |(byte_a, byte_b)| ASCII_LOWER_MAP[*byte_a] == ASCII_LOWER_MAP[*byte_b]) } -priv static ASCII_LOWER_MAP: &'static [u8] = &[ +static ASCII_LOWER_MAP: &'static [u8] = &[ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, @@ -333,7 +333,7 @@ priv static ASCII_LOWER_MAP: &'static [u8] = &[ 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, ]; -priv static ASCII_UPPER_MAP: &'static [u8] = &[ +static ASCII_UPPER_MAP: &'static [u8] = &[ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, |
