-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Add compile_error! #42620
Add compile_error! #42620
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
//#![feature(compile_error_macro)] |
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.
This test passes even though the feature flag is commented out. Are macros insta-stable?
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.
Are macros insta-stable?
Yes, right now they are.
Thanks for the PR @wesleywiser! @brson (or someone else) will be reviewing your PR soon. |
src/libcore/macros.rs
Outdated
/// For more information, see the [RFC]. | ||
/// | ||
/// [RFC]: https://github.com/rust-lang/rfcs/blob/master/text/1695-add-error-macro.md | ||
#[stable(feature = "compile_error_macro", since="1.19.0")] |
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.
You should have 1.20.0
here.
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
0a3f0ce
to
4bc0bf2
Compare
This doesn't have to be insta-stable, see https://github.com/rust-lang/rust/blob/master/src/libsyntax_ext/concat_idents.rs for an example of an unstable macro. |
Oh right, I remembered wrongly, what I thought was deprecation warnings of macros... |
22e3815
to
df9c667
Compare
Quick status update: I'm still working on this. I think the code changes are finished and tomorrow I'll work on updating the unstable book. |
df9c667
to
54e8f89
Compare
Pushed unstable docs |
This should be ready for review. |
☔ The latest upstream changes (presumably #42722) made this pull request unmergeable. Please resolve the merge conflicts. |
54e8f89
to
2bec12f
Compare
Rebased |
@bors r+ thanks @wesleywiser! |
📌 Commit 2bec12f has been approved by |
@bors rollup |
Add compile_error! Related to rust-lang#40872
Related to #40872