Skip to content

Commit 4d6836f

Browse files
committed
Fix privacy fallout from previous change
1 parent 31ac9c4 commit 4d6836f

32 files changed

+51
-51
lines changed

doc/guide-container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Reaching the end of the iterator is signalled by returning `None` instead of
9090
# fn main() {}
9191
/// A stream of N zeroes
9292
struct ZeroStream {
93-
priv remaining: uint
93+
remaining: uint
9494
}
9595

9696
impl ZeroStream {
@@ -305,7 +305,7 @@ The `ZeroStream` from earlier can provide an exact lower and upper bound:
305305
# fn main() {}
306306
/// A stream of N zeroes
307307
struct ZeroStream {
308-
priv remaining: uint
308+
remaining: uint
309309
}
310310
311311
impl ZeroStream {

src/libextra/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<T:Freeze + Send> Clone for Arc<T> {
148148
****************************************************************************/
149149

150150
#[doc(hidden)]
151-
struct MutexArcInner<T> { priv lock: Mutex, priv failed: bool, priv data: T }
151+
struct MutexArcInner<T> { lock: Mutex, failed: bool, data: T }
152152

153153
/// An Arc with mutable data protected by a blocking mutex.
154154
#[no_freeze]
@@ -312,7 +312,7 @@ impl PoisonOnFail {
312312
****************************************************************************/
313313

314314
#[doc(hidden)]
315-
struct RWArcInner<T> { priv lock: RWLock, priv failed: bool, priv data: T }
315+
struct RWArcInner<T> { lock: RWLock, failed: bool, data: T }
316316
/**
317317
* A dual-mode Arc protected by a reader-writer lock. The data can be accessed
318318
* mutably or immutably, and immutably-accessing tasks may run concurrently.

src/libextra/dlist.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ pub struct DList<T> {
3838
}
3939

4040
type Link<T> = Option<~Node<T>>;
41-
struct Rawlink<T> { priv p: *mut T }
41+
struct Rawlink<T> { p: *mut T }
4242

4343
struct Node<T> {
44-
priv next: Link<T>,
45-
priv prev: Rawlink<Node<T>>,
46-
priv value: T,
44+
next: Link<T>,
45+
prev: Rawlink<Node<T>>,
46+
value: T,
4747
}
4848

4949
/// Double-ended DList iterator

src/libextra/lru_cache.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ use std::to_bytes::Cb;
4343
use std::ptr;
4444
use std::cast;
4545

46-
struct KeyRef<K> { priv k: *K }
46+
struct KeyRef<K> { k: *K }
4747

4848
struct LruEntry<K, V> {
49-
priv key: Option<K>,
50-
priv value: Option<V>,
51-
priv next: *mut LruEntry<K, V>,
52-
priv prev: *mut LruEntry<K, V>,
49+
key: Option<K>,
50+
value: Option<V>,
51+
next: *mut LruEntry<K, V>,
52+
prev: *mut LruEntry<K, V>,
5353
}
5454

5555
/// An LRU Cache.

src/libextra/sync.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ pub struct Barrier {
709709

710710
// The inner state of a double barrier
711711
struct BarrierState {
712-
priv count: uint,
713-
priv generation_id: uint,
712+
count: uint,
713+
generation_id: uint,
714714
}
715715

716716
impl Barrier {

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ pub type ctxt = @ctxt_;
257257
/// The data structure to keep track of all the information that typechecker
258258
/// generates so that so that it can be reused and doesn't have to be redone
259259
/// later on.
260-
struct ctxt_ {
260+
pub struct ctxt_ {
261261
diag: @syntax::diagnostic::SpanHandler,
262262
interner: RefCell<HashMap<intern_key, ~t_box_>>,
263263
next_id: Cell<uint>,

src/librustc/util/sha2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ trait FixedBuffer {
109109

110110
/// A FixedBuffer of 64 bytes useful for implementing Sha256 which has a 64 byte blocksize.
111111
struct FixedBuffer64 {
112-
priv buffer: [u8, ..64],
113-
priv buffer_idx: uint,
112+
buffer: [u8, ..64],
113+
buffer_idx: uint,
114114
}
115115

116116
impl FixedBuffer64 {

src/librustpkg/package_source.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ fn prefixes(p: &Path) -> Prefixes {
7878
}
7979

8080
struct Prefixes {
81-
priv components: ~[~str],
82-
priv remaining: ~[~str]
81+
components: ~[~str],
82+
remaining: ~[~str]
8383
}
8484

8585
impl Iterator<(Path, Path)> for Prefixes {

src/librustuv/homing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub trait HomingIO {
126126
/// task back to its appropriate home (if applicable). The field is used to
127127
/// assert that we are where we think we are.
128128
struct HomingMissile {
129-
priv io_home: uint,
129+
io_home: uint,
130130
}
131131

132132
impl HomingMissile {

src/libstd/comm/select.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub struct Handle<'port, T> {
9595
priv port: &'port mut Port<T>,
9696
}
9797

98-
struct Packets { priv cur: *mut Packet }
98+
struct Packets { cur: *mut Packet }
9999

100100
impl Select {
101101
/// Creates a new selection structure. This set is initially empty and

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ struct PathSegmentAndBoundSet {
122122
}
123123

124124
/// A path paired with optional type bounds.
125-
struct PathAndBounds {
125+
pub struct PathAndBounds {
126126
path: ast::Path,
127127
bounds: Option<OptVec<TyParamBound>>,
128128
}

src/test/auxiliary/iss.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// part of issue-6919.rs
1414

1515
struct C<'a> {
16-
k: 'a ||,
16+
pub k: 'a ||,
1717
}
1818

1919
fn no_op() { }

src/test/bench/shootout-meteor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ fn iterate<'a, T>(x: T, f: 'a |&T| -> T) -> Iterate<'a, T> {
1818
Iterate {f: f, next: x}
1919
}
2020
struct Iterate<'a, T> {
21-
priv f: 'a |&T| -> T,
22-
priv next: T
21+
f: 'a |&T| -> T,
22+
next: T
2323
}
2424
impl<'a, T> Iterator<T> for Iterate<'a, T> {
2525
fn next(&mut self) -> Option<T> {
@@ -35,7 +35,7 @@ enum List<'a, T> {
3535
Cons(T, &'a List<'a, T>)
3636
}
3737
struct ListIterator<'a, T> {
38-
priv cur: &'a List<'a, T>
38+
cur: &'a List<'a, T>
3939
}
4040
impl<'a, T> List<'a, T> {
4141
fn iter(&'a self) -> ListIterator<'a, T> {

src/test/compile-fail/lint-missing-doc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
struct Foo {
2222
a: int,
23-
priv b: int,
23+
b: int,
2424
}
2525

2626
pub struct PubFoo { //~ ERROR: missing documentation
@@ -99,7 +99,7 @@ mod a {
9999
enum Baz {
100100
BazA {
101101
a: int,
102-
priv b: int
102+
b: int
103103
},
104104
BarB
105105
}

src/test/compile-fail/mutable-class-fields-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/compile-fail/mutable-class-fields.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313
how_hungry : int,
1414
}
1515

src/test/compile-fail/useless-priv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
struct A { pub i: int } //~ ERROR: unnecessary `pub`
12-
struct B { priv i: int } // don't warn b/c B can still be returned
11+
struct A { pub i: int }
12+
struct B { priv i: int } //~ ERROR: unnecessary `priv`
1313
pub enum C { pub Variant } //~ ERROR: unnecessary `pub`
1414
enum D { priv Variant2 } //~ ERROR: unnecessary `priv`
1515

src/test/run-pass/class-cast-to-trait-multiple-types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait noisy {
1515
}
1616

1717
struct dog {
18-
priv barks: uint,
18+
barks: uint,
1919

2020
volume: int,
2121
}
@@ -50,7 +50,7 @@ fn dog() -> dog {
5050

5151
#[deriving(Clone)]
5252
struct cat {
53-
priv meows: uint,
53+
meows: uint,
5454

5555
how_hungry: int,
5656
name: ~str,

src/test/run-pass/class-cast-to-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait noisy {
1515
}
1616

1717
struct cat {
18-
priv meows: uint,
18+
meows: uint,
1919
how_hungry: int,
2020
name: ~str,
2121
}

src/test/run-pass/class-impl-very-parameterized-trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl cmp::Eq for cat_type {
2727
// ok: T should be in scope when resolving the trait ref for map
2828
struct cat<T> {
2929
// Yes, you can have negative meows
30-
priv meows : int,
30+
meows : int,
3131

3232
how_hungry : int,
3333
name : T,

src/test/run-pass/class-implement-trait-cross-crate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern mod cci_class_trait;
1414
use cci_class_trait::animals::noisy;
1515

1616
struct cat {
17-
priv meows: uint,
17+
meows: uint,
1818

1919
how_hungry : int,
2020
name : ~str,

src/test/run-pass/class-implement-traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ trait noisy {
1616

1717
#[deriving(Clone)]
1818
struct cat {
19-
priv meows : uint,
19+
meows : uint,
2020

2121
how_hungry : int,
2222
name : ~str,

src/test/run-pass/class-methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/run-pass/class-poly-methods.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
// except according to those terms.
1010

1111
struct cat<U> {
12-
priv info : ~[U],
13-
priv meows : uint,
12+
info : ~[U],
13+
meows : uint,
1414

1515
how_hungry : int,
1616
}

src/test/run-pass/class-separate-impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// xfail-fast
1414
struct cat {
15-
priv meows : uint,
15+
meows : uint,
1616

1717
how_hungry : int,
1818
name : ~str,

src/test/run-pass/class-typarams.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat<U> {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/run-pass/classes-simple-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/run-pass/classes-simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/run-pass/classes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
name : ~str,

src/test/run-pass/issue-3563-3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ struct Rect {
4747
struct AsciiArt {
4848
width: uint,
4949
height: uint,
50-
priv fill: char,
51-
priv lines: ~[~[char]],
50+
fill: char,
51+
lines: ~[~[char]],
5252

5353
// This struct can be quite large so we'll disable copying: developers need
5454
// to either pass these structs around via references or move them.

src/test/run-pass/private-class-field.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

src/test/run-pass/private-method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
struct cat {
12-
priv meows : uint,
12+
meows : uint,
1313

1414
how_hungry : int,
1515
}

0 commit comments

Comments
 (0)