Skip to content

Commit a7453ad

Browse files
committed
auto merge of #9969 : reedlepee123/rust/priv_fields, r=bstrie
2 parents b477f7a + 7e6f5bb commit a7453ad

Some content is hidden

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

53 files changed

+216
-214
lines changed

src/libextra/arc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,15 @@ fn borrow_rwlock<T:Freeze + Send>(state: *mut RWArcInner<T>) -> *RWLock {
521521

522522
/// The "write permission" token used for RWArc.write_downgrade().
523523
pub struct RWWriteMode<'self, T> {
524-
data: &'self mut T,
525-
token: sync::RWLockWriteMode<'self>,
526-
poison: PoisonOnFail,
524+
priv data: &'self mut T,
525+
priv token: sync::RWLockWriteMode<'self>,
526+
priv poison: PoisonOnFail,
527527
}
528528

529529
/// The "read permission" token used for RWArc.write_downgrade().
530530
pub struct RWReadMode<'self, T> {
531-
data: &'self T,
532-
token: sync::RWLockReadMode<'self>,
531+
priv data: &'self T,
532+
priv token: sync::RWLockReadMode<'self>,
533533
}
534534

535535
impl<'self, T:Freeze + Send> RWWriteMode<'self, T> {

src/libextra/base64.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ pub enum CharacterSet {
2222
/// Contains configuration parameters for `to_base64`.
2323
pub struct Config {
2424
/// Character set to use
25-
char_set: CharacterSet,
25+
priv char_set: CharacterSet,
2626
/// True to pad output with `=` characters
27-
pad: bool,
27+
priv pad: bool,
2828
/// `Some(len)` to wrap lines at `len`, `None` to disable line wrapping
29-
line_length: Option<uint>
29+
priv line_length: Option<uint>
3030
}
3131

3232
/// Configuration for RFC 4648 standard base64 encoding

src/libextra/bitv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ enum Op {Union, Intersect, Assign, Difference}
226226
#[deriving(Clone)]
227227
pub struct Bitv {
228228
/// Internal representation of the bit vector (small or large)
229-
rep: BitvVariant,
229+
priv rep: BitvVariant,
230230
/// The number of valid bits in the internal representation
231-
nbits: uint
231+
priv nbits: uint
232232
}
233233

234234
fn die() -> ! {

src/libextra/ebml.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl Doc {
5050
}
5151

5252
pub struct TaggedDoc {
53-
tag: uint,
53+
priv tag: uint,
5454
doc: Doc,
5555
}
5656

src/libextra/fileinput.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ struct FileInput_ {
155155
// "self.fi" -> "self." and renaming FileInput_. Documentation above
156156
// will likely have to be updated to use `let mut in = ...`.
157157
pub struct FileInput {
158-
fi: @mut FileInput_
158+
priv fi: @mut FileInput_
159159
}
160160

161161
impl FileInput {

src/libextra/getopts.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ pub struct Opt {
119119
/// How often it can occur
120120
occur: Occur,
121121
/// Which options it aliases
122-
aliases: ~[Opt],
122+
priv aliases: ~[Opt],
123123
}
124124

125125
/// Describes wether an option is given at all or has a value.
@@ -134,9 +134,9 @@ enum Optval {
134134
#[deriving(Clone, Eq)]
135135
pub struct Matches {
136136
/// Options that matched
137-
opts: ~[Opt],
137+
priv opts: ~[Opt],
138138
/// Values of the Options that matched
139-
vals: ~[~[Optval]],
139+
priv vals: ~[~[Optval]],
140140
/// Free string fragments
141141
free: ~[~str]
142142
}

src/libextra/glob.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,21 +480,21 @@ pub struct MatchOptions {
480480
* currently only considers upper/lower case relationships between ASCII characters,
481481
* but in future this might be extended to work with Unicode.
482482
*/
483-
case_sensitive: bool,
483+
priv case_sensitive: bool,
484484

485485
/**
486486
* If this is true then path-component separator characters (e.g. `/` on Posix)
487487
* must be matched by a literal `/`, rather than by `*` or `?` or `[...]`
488488
*/
489-
require_literal_separator: bool,
489+
priv require_literal_separator: bool,
490490

491491
/**
492492
* If this is true then paths that contain components that start with a `.` will
493493
* not match unless the `.` appears literally in the pattern: `*`, `?` or `[...]`
494494
* will not match. This is useful because such files are conventionally considered
495495
* hidden on Unix systems and it might be desirable to skip them when listing files.
496496
*/
497-
require_literal_leading_dot: bool
497+
priv require_literal_leading_dot: bool
498498
}
499499

500500
impl MatchOptions {

src/libextra/io_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ use std::cast;
1717
/// An implementation of the io::Reader interface which reads a buffer of bytes
1818
pub struct BufReader {
1919
/// The buffer of bytes to read
20-
buf: ~[u8],
20+
priv buf: ~[u8],
2121
/// The current position in the buffer of bytes
22-
pos: @mut uint
22+
priv pos: @mut uint
2323
}
2424

2525
impl BufReader {

src/libextra/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ pub type Object = TreeMap<~str, Json>;
4949
/// returned
5050
pub struct Error {
5151
/// The line number at which the error occurred
52-
line: uint,
52+
priv line: uint,
5353
/// The column number at which the error occurred
54-
col: uint,
54+
priv col: uint,
5555
/// A message describing the type of the error
56-
msg: @~str,
56+
priv msg: @~str,
5757
}
5858

5959
fn escape_str(s: &str) -> ~str {

src/libextra/num/rational.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ use super::bigint::BigInt;
2020
#[deriving(Clone)]
2121
#[allow(missing_doc)]
2222
pub struct Ratio<T> {
23-
numer: T,
24-
denom: T
23+
priv numer: T,
24+
priv denom: T
2525
}
2626

2727
/// Alias for a `Ratio` of machine-sized integers.

0 commit comments

Comments
 (0)