librustc: Forbid private types in public APIs.#17401
Merged
bors merged 1 commit intorust-lang:masterfrom Sep 23, 2014
Merged
Conversation
Member
|
There's a few corner cases which may not yet be covered by the lint (I forget), can you add some tests to make sure they're handled? We allow trait bounds on structs as well now, right? In general the RFC has many tests as well, I just want to make sure we've got our bases covered before closing the issue. The RFC also mentions that a feature gate would be added, I just want to confirm that you explicitly didn't implement it (which is fine by me!) |
3167755 to
2f1127c
Compare
Contributor
Author
|
Updated. re-r? @alexcrichton |
Member
|
Does the associated issue need to have its title updated? It refers to feature gating this, not forbidding it. EDIT: nevermind, I misread the implementation |
Member
|
r=me with as many things moved over to visitors as possible. |
47dbac1 to
c49d84b
Compare
c49d84b to
3d0c822
Compare
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 rust-lang#16463.
RFC rust-lang#48.
[breaking-change]
3d0c822 to
e9ad12c
Compare
bors
added a commit
that referenced
this pull request
Sep 23, 2014
…alexcrichton
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.
Closes #16463.
RFC #48.
[breaking-change]
r? @alexcrichton
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This breaks code like:
Change this code to:
The
visible_private_typeslint has been removed, since it is now anerror to attempt to expose a private type in a public API.
Closes #16463.
RFC #48.
[breaking-change]
r? @alexcrichton