-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Implement cfg_os_version_min
#136867
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
base: master
Are you sure you want to change the base?
Implement cfg_os_version_min
#136867
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_attr_parsing These commits modify compiler targets. |
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
Hmm, I was hoping to resolve those in future PRs, since I believe this feature is useful to the standard library today (or rather yesterday), regardless of future semantics and syntax. Would it help if I renamed it to |
You should ask T-lang to approve this PR as an "T-lang experiment", that way it could implemented in the compiler even without an FCP on the RFC. |
6125af0
to
bb55488
Compare
Right, that's what it's called, couldn't remember, thanks! (filed #136871 so that I'll be able to find it in the future) |
This comment has been minimized.
This comment has been minimized.
Probably worth trying this as a T-lang experiment yeah |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your work! But I know little about this feature so r? compiler
…=scottmcm dev-guide: Link to `t-lang` procedures for new features I was confused in rust-lang#136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
Rollup merge of rust-lang#136871 - madsmtm:link-to-lang-procedures, r=scottmcm dev-guide: Link to `t-lang` procedures for new features I was confused in rust-lang#136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
dev-guide: Link to `t-lang` procedures for new features I was confused in rust-lang/rust#136867, because while I did remember that such a procedure existed, but I couldn't seem to find it in the dev guide.
☔ The latest upstream changes (presumably #137046) made this pull request unmergeable. Please resolve the merge conflicts. |
bb55488
to
2a44225
Compare
Some changes occurred in compiler/rustc_codegen_ssa |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #139037) made this pull request unmergeable. Please resolve the merge conflicts. |
…=Noratrieb Refactor Apple version handling in the compiler Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies. There should be no functional changes in this PR. `@rustbot` label O-apple r? rust-lang/compiler
…=Noratrieb Refactor Apple version handling in the compiler Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies. There should be no functional changes in this PR. ``@rustbot`` label O-apple r? rust-lang/compiler
…oratrieb Refactor Apple version handling in the compiler Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies. There should be no functional changes in this PR. `@rustbot` label O-apple r? rust-lang/compiler
2a44225
to
b15e23c
Compare
This comment has been minimized.
This comment has been minimized.
b15e23c
to
bf8be08
Compare
This comment has been minimized.
This comment has been minimized.
bf8be08
to
b440c36
Compare
This comment has been minimized.
This comment has been minimized.
Based on in-progress RFC: rust-lang/rfcs#3750. Only implemented for Apple platforms for now, but written in a way that should be easily expandable to include other platforms.
b440c36
to
00bdfcc
Compare
Refactor Apple version handling in the compiler Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang/rust#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang/rust#131477 have fewer conflicts / PR dependencies. There should be no functional changes in this PR. `@rustbot` label O-apple r? rust-lang/compiler
Implement the
cfg_os_version_min
feature that is being RFC'd in rust-lang/rfcs#3750, tracking issue #136866. This implementation only handles Apple targets, but it should be fairly easy to add support for other targets after this.The RFC is not finalized, and as such things may change (especially the syntax). Regardless, I think it makes sense to start experimenting with it; even if the feature is ultimately rejected, it is necessary for the standard library (an example is that it would allow us to ship #122408 without a dangerous fallback).
Using this in the standard library is done in a draft PR.
CC @ChrisDenton @BlackHoleFox
@rustbot label O-apple
r? rust-lang/compiler