diff options
| author | bors <bors@rust-lang.org> | 2014-02-28 06:06:31 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-28 06:06:31 -0800 |
| commit | 2e51e8d926625187226e2e37381b9ea671e18a48 (patch) | |
| tree | 265ef6e286dda8ab1499b779f250c9423b0bc2e7 /src/libstd | |
| parent | b99a8ffad4b2f791c2a32e036dffb160a00bdc69 (diff) | |
| parent | 218eae06ab7c7858057cc6bbd28fb4e0db9f5264 (diff) | |
| download | rust-2e51e8d926625187226e2e37381b9ea671e18a48.tar.gz rust-2e51e8d926625187226e2e37381b9ea671e18a48.zip | |
auto merge of #12595 : huonw/rust/pub-vis-typ, r=alexcrichton
These are types that are in exported type signatures, but are not
exported themselves, e.g.
struct Foo { ... }
pub fn bar() -> Foo { ... }
will warn about the Foo.
Such types are not listed in documentation, and cannot be named outside
the crate in which they are declared, which is very user-unfriendly.
cc #10573.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/libc.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/local.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/local_ptr.rs | 1 | ||||
| -rw-r--r-- | src/libstd/rt/unwind.rs | 2 |
4 files changed, 5 insertions, 2 deletions
diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index 07be753925f..ef641bbb665 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -1130,7 +1130,7 @@ pub mod types { Data4: [BYTE, ..8], } - struct WSAPROTOCOLCHAIN { + pub struct WSAPROTOCOLCHAIN { ChainLen: c_int, ChainEntries: [DWORD, ..MAX_PROTOCOL_CHAIN], } diff --git a/src/libstd/rt/local.rs b/src/libstd/rt/local.rs index 76a672b79ca..3cfa494d382 100644 --- a/src/libstd/rt/local.rs +++ b/src/libstd/rt/local.rs @@ -24,6 +24,7 @@ pub trait Local<Borrowed> { unsafe fn try_unsafe_borrow() -> Option<*mut Self>; } +#[allow(visible_private_types)] impl Local<local_ptr::Borrowed<Task>> for Task { #[inline] fn put(value: ~Task) { unsafe { local_ptr::put(value) } } @@ -127,4 +128,3 @@ mod test { } } - diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index d4e57ab19b1..898004c665d 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -366,6 +366,7 @@ pub mod native { #[inline] #[cfg(not(test))] + #[allow(visible_private_types)] pub fn maybe_tls_key() -> Option<tls::Key> { unsafe { // NB: This is a little racy because, while the key is diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index b9459aed582..b194a9fe308 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -280,6 +280,7 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class { #[cfg(not(target_arch = "arm"), not(test))] #[doc(hidden)] +#[allow(visible_private_types)] pub mod eabi { use uw = super::libunwind; use libc::c_int; @@ -333,6 +334,7 @@ pub mod eabi { // ARM EHABI uses a slightly different personality routine signature, // but otherwise works the same. #[cfg(target_arch = "arm", not(test))] +#[allow(visible_private_types)] pub mod eabi { use uw = super::libunwind; use libc::c_int; |
