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]
This commit is contained in:
Patrick Walton 2014-09-19 12:30:07 -07:00
parent 43fd619819
commit e9ad12c0ca
49 changed files with 169 additions and 80 deletions

View file

@ -153,7 +153,7 @@ pub enum AttributeSet {
FunctionIndex = !0
}
trait AttrHelper {
pub trait AttrHelper {
fn apply_llfn(&self, idx: c_uint, llfn: ValueRef);
fn apply_callsite(&self, idx: c_uint, callsite: ValueRef);
}