From e9ad12c0cae5c43ada6641c7dc840a0fbe5010a2 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 19 Sep 2014 12:30:07 -0700 Subject: librustc: Forbid private types in public APIs. This breaks code like: struct Foo { ... } pub fn make_foo() -> Foo { ... } Change this code to: pub struct Foo { // note `pub` ... } pub fn make_foo() -> Foo { ... } The `visible_private_types` lint has been removed, since it is now an error to attempt to expose a private type in a public API. In its place a `#[feature(visible_private_types)]` gate has been added. Closes #16463. RFC #48. [breaking-change] --- src/libnative/io/timer_unix.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libnative') diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs index 0a5de325c09..8c6fd83a76b 100644 --- a/src/libnative/io/timer_unix.rs +++ b/src/libnative/io/timer_unix.rs @@ -66,7 +66,7 @@ pub struct Timer { inner: Option>, } -struct Inner { +pub struct Inner { cb: Option>, interval: u64, repeat: bool, @@ -74,7 +74,6 @@ struct Inner { id: uint, } -#[allow(visible_private_types)] pub enum Req { // Add a new timer to the helper thread. NewTimer(Box), -- cgit 1.4.1-3-g733a5