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

Support `cfg` and `cfg_attr` on generic parameters #61547

Merged
merged 1 commit into from Jun 19, 2019

Conversation

@petrochenkov
Copy link
Contributor

commented Jun 5, 2019

cfg attributes are supported in all other positions where attributes are accepted at all.

They were previously prohibited in #51283 because they weren't implemented correctly before that and were simply ignored.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jun 5, 2019

r? @pnkfelix

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

Show resolved Hide resolved src/libsyntax/config.rs Outdated
@Centril

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

I don't know whether we have any lint check attributes that affect generic parameters, but how does the language interact with those before / after this PR?

@Centril

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

I see no reason not to do this and every reason to both in terms of consistency and usability. That said, since it is a language change, let's formally approve this change...

@rfcbot merge

@rfcbot

This comment has been minimized.

Copy link

commented Jun 5, 2019

Team member @Centril has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@Centril

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

N.B. Aaron is on leave so I've checked their box.

@petrochenkov

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

@Centril

I don't know whether we have any lint check attributes that affect generic parameters, but how does the language interact with those before / after this PR?

This change is orthogonal to lint checking attributes.
allow/deny and friends still don't work on generic parameters (which is a bug, but low priority).

fn f<#[allow(warnings)] foo>() {} // warning: type parameter `foo` should have an upper camel case name
@Centril

This comment has been minimized.

Copy link
Member

commented Jun 5, 2019

This change is orthogonal to lint checking attributes.

Thanks! Would you mind filing an issue if there isn't one already?

@petrochenkov

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2019

Would you mind filing an issue if there isn't one already?

#61552

@petrochenkov petrochenkov force-pushed the petrochenkov:cfgen branch from 8c79a0c to f74a0a5 Jun 5, 2019

@Centril Centril removed the I-nominated label Jun 6, 2019

@Centril Centril added this to the 1.37 milestone Jun 7, 2019

@rfcbot

This comment has been minimized.

Copy link

commented Jun 9, 2019

🔔 This is now entering its final comment period, as per the review above. 🔔

@Centril

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

r? @Centril

r=me rollup on the implementation when FCP completes.

@rust-highfive rust-highfive assigned Centril and unassigned pnkfelix Jun 10, 2019

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2019

☔️ The latest upstream changes (presumably #60669) made this pull request unmergeable. Please resolve the merge conflicts.

@rfcbot

This comment has been minimized.

Copy link

commented Jun 19, 2019

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@petrochenkov petrochenkov force-pushed the petrochenkov:cfgen branch from f74a0a5 to 0b58bb3 Jun 19, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2019

@bors r=Centril rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2019

📌 Commit 0b58bb3 has been approved by Centril

Centril added a commit to Centril/rust that referenced this pull request Jun 19, 2019

Rollup merge of rust-lang#61547 - petrochenkov:cfgen, r=Centril
Support `cfg` and `cfg_attr` on generic parameters

`cfg` attributes are supported in all other positions where attributes are accepted at all.

They were previously prohibited in rust-lang#51283 because they weren't implemented correctly before that and were simply ignored.

bors added a commit that referenced this pull request Jun 19, 2019

Auto merge of #61957 - Centril:rollup-ljlj6vt, r=Centril
Rollup of 3 pull requests

Successful merges:

 - #60667 ( Add functions for building raw slices to libcore )
 - #61547 (Support `cfg` and `cfg_attr` on generic parameters)
 - #61940 (Make Place::ty iterate)

Failed merges:

r? @ghost

Centril added a commit to Centril/rust that referenced this pull request Jun 19, 2019

Rollup merge of rust-lang#61547 - petrochenkov:cfgen, r=Centril
Support `cfg` and `cfg_attr` on generic parameters

`cfg` attributes are supported in all other positions where attributes are accepted at all.

They were previously prohibited in rust-lang#51283 because they weren't implemented correctly before that and were simply ignored.

bors added a commit that referenced this pull request Jun 19, 2019

Auto merge of #61962 - Centril:rollup-y6sg1zw, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #60667 ( Add functions for building raw slices to libcore )
 - #61547 (Support `cfg` and `cfg_attr` on generic parameters)
 - #61861 (Update rustfmt and rls)
 - #61940 (Make Place::ty iterate)

Failed merges:

r? @ghost

bors added a commit that referenced this pull request Jun 19, 2019

Auto merge of #61962 - Centril:rollup-y6sg1zw, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #60667 ( Add functions for building raw slices to libcore )
 - #61547 (Support `cfg` and `cfg_attr` on generic parameters)
 - #61861 (Update rustfmt and rls)
 - #61940 (Make Place::ty iterate)

Failed merges:

r? @ghost

@bors bors merged commit 0b58bb3 into rust-lang:master Jun 19, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
pr Build #20190619.16 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.