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

Revert "Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis" #83713

Merged
merged 2 commits into from
Apr 28, 2021

Conversation

spastorino
Copy link
Member

This reverts commit e2561c5, reversing
changes made to 2982ba5.

As discussed in #83641 this feature is not complete and in particular doesn't work cross macros and given that this is not going to be included in edition 2021 nobody seems to be trying to fix the underlying problem. When can add this again I guess, whenever somebody has the time to make it work cross crates.

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 31, 2021
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Mar 31, 2021

📌 Commit bfb5c48aba30a976b7a8e73bb67db9ac657f2bc8 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 31, 2021
@nikomatsakis
Copy link
Contributor

Actually, @bors r-

Is there any special procedure for removing a feature gate? I don't think so, right? (cc @rust-lang/compiler)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 31, 2021
@nikomatsakis
Copy link
Contributor

Also we should probably discuss this in @rust-lang/lang meeting

@nikomatsakis nikomatsakis added I-nominated T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Mar 31, 2021
@nikomatsakis
Copy link
Contributor

Nominating for the @rust-lang/lang meeting:

Given the current status of the effort around pub macro_rules! and the buggy state of the implementation, I was saying I'd probably rather just back out the PR if it is not under active development.

But I'd like @rylev to weigh in here too.

@varkor
Copy link
Member

varkor commented Mar 31, 2021

Is there any special procedure for removing a feature gate?

The removed feature needs to be added to compiler/rustc_feature/src/removed.rs.

@crlf0710
Copy link
Member

Personally I do feel there's some value in using pub(crate) macro_rules! even in its current form (I was writing a few macro_rules!-heavy crates and it's nice to use this because i don't have to rearrange the modules according the order the macros are used).

It would be nice if instead removing this, just add it to the list of incomplete features...

@danielhenrymantilla
Copy link
Contributor

danielhenrymantilla commented Apr 21, 2021

@crlf0710 yeah, the current approach to get that is a bit uglier: https://stackoverflow.com/a/67140319/10776437

@nikomatsakis
Copy link
Contributor

We discussed this in the @rust-lang/lang meeting yesterday. There is no doubt that the feature has value, but right now there is nobody actively working to resolve the various problems that were encountered with its design, so we are inclined to remove the code (it can be added again later if the situation changes).

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the feature to the list of deprecated features as @varkor suggested, @spastorino ?

@spastorino
Copy link
Member Author

@nikomatsakis I guess you meant as a removed feature, right?. I got confused also because someone else was suggesting to add it to incomplete features and to not remove it.

@nikomatsakis
Copy link
Contributor

@spastorino that is what i meant, yes.

…matsakis"

This reverts commit e2561c5, reversing
changes made to 2982ba5.
@@ -134,6 +134,8 @@ declare_features! (
which is available from cargo build scripts with `cargo:rustc-link-arg` now")),
/// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
(removed, main, "1.53.0", Some(29634), None, None),
(removed, pub_macro_rules, "1.53.0", Some(78855), None,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess since is the first version in which the feature would be removed (which would be 1.53) but I wasn't 100% sure, so please check this in particular when reviewing.

@@ -134,6 +134,8 @@ declare_features! (
which is available from cargo build scripts with `cargo:rustc-link-arg` now")),
/// Allows using `#[main]` to replace the entrypoint `#[lang = "start"]` calls.
(removed, main, "1.53.0", Some(29634), None, None),
(removed, pub_macro_rules, "1.53.0", Some(78855), None,
Some("removed due to being incomplete, in particular it does not work across crates")),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, always check my broken english :)

@spastorino
Copy link
Member Author

@nikomatsakis done, have made a couple of comments here and here

@spastorino
Copy link
Member Author

Forgot to comment something I was chatting with Niko. The feature was introduced in 1.52 and the current stable version is 1.51, so we could also just apply the revert and backport the revert to beta so the feature would never reach stable.

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 27, 2021

📌 Commit 83767d9 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 27, 2021
@nikomatsakis
Copy link
Contributor

Note: I would rather just revert the normal way and and let it ride the trains than bother with the increasing hassle/risk of backporting.

@bors
Copy link
Contributor

bors commented Apr 28, 2021

⌛ Testing commit 83767d9 with merge 855c2d1...

@bors
Copy link
Contributor

bors commented Apr 28, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 855c2d1 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants