Skip to content

Commit 218eae0

Browse files
committed
Publicise types/add #[allow(visible_private_types)] to a variety of places.
There's a lot of these types in the compiler libraries, and a few of the older or private stdlib ones. Some types are obviously meant to be public, others not so much.
1 parent fbdd3b2 commit 218eae0

File tree

13 files changed

+16
-5
lines changed

13 files changed

+16
-5
lines changed

src/libextra/workcache.rs

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

1111
#[allow(missing_doc)];
12+
#[allow(visible_private_types)];
1213

1314
use serialize::json;
1415
use serialize::json::ToJson;

src/libgreen/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173

174174
// NB this does *not* include globs, please keep it that way.
175175
#[feature(macro_rules)];
176+
#[allow(visible_private_types)];
176177

177178
use std::mem::replace;
178179
use std::os;

src/libnative/io/timer_other.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct Inner {
7171
id: uint,
7272
}
7373

74+
#[allow(visible_private_types)]
7475
pub enum Req {
7576
// Add a new timer to the helper thread.
7677
NewTimer(~Inner),

src/libnative/io/timer_timerfd.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ pub struct Timer {
4444
priv on_worker: bool,
4545
}
4646

47+
#[allow(visible_private_types)]
4748
pub enum Req {
4849
NewTimer(libc::c_int, Chan<()>, bool, imp::itimerspec),
4950
RemoveTimer(libc::c_int, Chan<()>),

src/librustc/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ This API is completely unstable and subject to change.
3030
#[feature(macro_rules, globs, struct_variant, managed_boxes)];
3131
#[feature(quote)];
3232

33+
#[allow(visible_private_types)];
34+
3335
extern crate extra;
3436
extern crate flate;
3537
extern crate arena;

src/librustdoc/html/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub enum ExternalLocation {
9999
}
100100

101101
/// Different ways an implementor of a trait can be rendered.
102-
enum Implementor {
102+
pub enum Implementor {
103103
/// Paths are displayed specially by omitting the `impl XX for` cruft
104104
PathType(clean::Type),
105105
/// This is the generic representation of a trait implementor, used for

src/librustuv/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ via `close` and `delete` methods.
4141

4242
#[feature(macro_rules)];
4343
#[deny(unused_result, unused_must_use)];
44+
#[allow(visible_private_types)];
4445

4546
#[cfg(test)] extern crate green;
4647

src/libstd/libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ pub mod types {
11301130
Data4: [BYTE, ..8],
11311131
}
11321132

1133-
struct WSAPROTOCOLCHAIN {
1133+
pub struct WSAPROTOCOLCHAIN {
11341134
ChainLen: c_int,
11351135
ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN],
11361136
}

src/libstd/rt/local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub trait Local<Borrowed> {
2424
unsafe fn try_unsafe_borrow() -> Option<*mut Self>;
2525
}
2626

27+
#[allow(visible_private_types)]
2728
impl Local<local_ptr::Borrowed<Task>> for Task {
2829
#[inline]
2930
fn put(value: ~Task) { unsafe { local_ptr::put(value) } }
@@ -127,4 +128,3 @@ mod test {
127128
}
128129

129130
}
130-

src/libstd/rt/local_ptr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ pub mod native {
366366

367367
#[inline]
368368
#[cfg(not(test))]
369+
#[allow(visible_private_types)]
369370
pub fn maybe_tls_key() -> Option<tls::Key> {
370371
unsafe {
371372
// NB: This is a little racy because, while the key is

0 commit comments

Comments
 (0)