Skip to content
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

Make sure crates not opting in to staged_api don't use staged_api #44008

Merged
merged 3 commits into from
Aug 22, 2017

Conversation

RalfJung
Copy link
Member

This also fixes the problem that with -Zforce-unstable-if-unmarked set, crates could not use #[deprecated].

If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when -Zforce-unstable-if-unmarked is set. I have prepared that at /~https://github.com/RalfJung/rust/tree/staged2. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it?

Cc @alexcrichton #43975

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@arielb1
Copy link
Contributor

arielb1 commented Aug 21, 2017

r? @alexcrichton

@arielb1
Copy link
Contributor

arielb1 commented Aug 21, 2017

Also, looks like at least rustc_plugin also needs to be staged_api:

[00:28:14]    Compiling rustc_plugin v0.0.0 (file:///checkout/src/librustc_plugin)

[00:28:14] error: stability attributes may not be used outside of the standard library

[00:28:14]    --> /checkout/src/librustc_plugin/registry.rs:129:5

[00:28:14]     |

[00:28:14] 129 |     #[unstable(feature = "rustc_private", issue = "27812")]

[00:28:14]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[00:28:14] 

[00:28:14] error: stability attributes may not be used outside of the standard library

[00:28:14]    --> /checkout/src/librustc_plugin/registry.rs:130:5

[00:28:14]     |

[00:28:14] 130 |     #[rustc_deprecated(since = "1.15.0", reason = "replaced by macros 1.1 (RFC 1861)")]

[00:28:14]     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[00:28:14] 

[00:28:15] error: aborting due to 2 previous errors

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Contributor

bors commented Aug 21, 2017

📌 Commit 472e7e3 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Aug 22, 2017

⌛ Testing commit 472e7e3 with merge 1177911...

bors added a commit that referenced this pull request Aug 22, 2017
Make sure crates not opting in to staged_api don't use staged_api

This also fixes the problem that with `-Zforce-unstable-if-unmarked` set, crates could not use `#[deprecated]`.

If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when  `-Zforce-unstable-if-unmarked` is set. I have prepared that at </~https://github.com/RalfJung/rust/tree/staged2>. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it?

Cc @alexcrichton #43975
@bors
Copy link
Contributor

bors commented Aug 22, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 1177911 to master...

@bors bors merged commit 472e7e3 into rust-lang:master Aug 22, 2017
@RalfJung RalfJung deleted the staged1 branch August 22, 2017 14:02
@RalfJung RalfJung mentioned this pull request Aug 23, 2017
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.

6 participants