From 218eae06ab7c7858057cc6bbd28fb4e0db9f5264 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Thu, 27 Feb 2014 18:48:21 +1100 Subject: 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. --- src/libstd/rt/local.rs | 2 +- src/libstd/rt/local_ptr.rs | 1 + src/libstd/rt/unwind.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/libstd/rt') 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 { unsafe fn try_unsafe_borrow() -> Option<*mut Self>; } +#[allow(visible_private_types)] impl Local> 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 { 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; -- cgit 1.4.1-3-g733a5