Skip to content

libstd: set baseline stability levels #15289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2014
Merged

Conversation

aturon
Copy link
Member

@aturon aturon commented Jul 1, 2014

Earlier commits have established a baseline of experimental stability
for all crates under the facade (so their contents are considered
experimental within libstd). Since experimental is allow by
default, we should use the same baseline stability for libstd itself.

This commit adds experimental tags to all of the modules defined in
std, and unstable to std itself.

@alexcrichton
Copy link
Member

Does this currently have any interaction with extern crate directives?

As in, would this lint about extern crate std by default? (I almost expect that it would)

@aturon
Copy link
Member Author

aturon commented Jul 1, 2014

No, the stability lints are currently all-or-nothing, so you get no warnings about experimental by default.

@alexcrichton
Copy link
Member

From our chat on IRC:

In the future world when all of libstd is properly #[unstable] or #[stable] and we warn about #[experimental] by default, this will likely cause all extern crate std directives to warn by default.

For now, could we mark all unmarked modules themselves as #[experimental], and the std crate #[unstable]? That should be closer to what we want in the future than the crate itself being experimental.

Earlier commits have established a baseline of `experimental` stability
for all crates under the facade (so their contents are considered
experimental within libstd). Since `experimental` is `allow` by
default, we should use the same baseline stability for libstd itself.

This commit adds `experimental` tags to all of the modules defined in
`std`, and `unstable` to `std` itself.
@aturon aturon changed the title std: set stability to experimental libstd: set baseline stability levels Jul 1, 2014
@aturon
Copy link
Member Author

aturon commented Jul 1, 2014

@alexcrichton Updated.

@huonw
Copy link
Member

huonw commented Jul 1, 2014

In the future world when all of libstd is properly #[unstable] or #[stable] and we warn about #[experimental] by default, this will likely cause all extern crate std directives to warn by default.

Maybe we should have more granular activation of attributes: I imagine that people may wish to explicitly use experimental items from some crate they've written, but not accidentally use experimental things from the standard library, or other crates they have (e.g. writing foo and foo_macros, or any other set of crates authored by the same group).

@aturon
Copy link
Member Author

aturon commented Jul 1, 2014

@huonw Yes, I think the lint will definitely need this ability. I recently changed the lint to ignore crate-local stability, which is a step in this direction.

bors added a commit that referenced this pull request Jul 1, 2014
Earlier commits have established a baseline of `experimental` stability
for all crates under the facade (so their contents are considered
experimental within libstd). Since `experimental` is `allow` by
default, we should use the same baseline stability for libstd itself.

This commit adds `experimental` tags to all of the modules defined in
`std`, and `unstable` to `std` itself.
@bors bors closed this Jul 1, 2014
@bors bors merged commit f7bb31a into rust-lang:master Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants