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

Add compile_error! #42620

Merged
merged 2 commits into from
Jun 21, 2017
Merged

Add compile_error! #42620

merged 2 commits into from
Jun 21, 2017

Conversation

wesleywiser
Copy link
Member

@wesleywiser wesleywiser commented Jun 13, 2017

Related to #40872

@rust-highfive
Copy link
Collaborator

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)]
Copy link
Member Author

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?

Copy link
Member

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.

@arielb1 arielb1 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 13, 2017
@arielb1
Copy link
Contributor

arielb1 commented Jun 13, 2017

Thanks for the PR @wesleywiser! @brson (or someone else) will be reviewing your PR soon.

/// 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")]
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks

@ollie27
Copy link
Member

ollie27 commented Jun 14, 2017

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.

@est31
Copy link
Member

est31 commented Jun 14, 2017

Oh right, I remembered wrongly, what I thought was deprecation warnings of macros...

@wesleywiser wesleywiser force-pushed the compile_error branch 2 times, most recently from 22e3815 to df9c667 Compare June 16, 2017 03:12
@wesleywiser
Copy link
Member Author

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.

@wesleywiser wesleywiser changed the title [WIP] Add compile_error! Add compile_error! Jun 17, 2017
@wesleywiser
Copy link
Member Author

Pushed unstable docs

@wesleywiser
Copy link
Member Author

This should be ready for review.

@bors
Copy link
Contributor

bors commented Jun 19, 2017

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

@wesleywiser
Copy link
Member Author

Rebased

@arielb1
Copy link
Contributor

arielb1 commented Jun 20, 2017

r? @sfackler - is @brson on PTO or something?

@brson
Copy link
Contributor

brson commented Jun 20, 2017

@bors r+ thanks @wesleywiser!

@bors
Copy link
Contributor

bors commented Jun 20, 2017

📌 Commit 2bec12f has been approved by brson

@Mark-Simulacrum
Copy link
Member

@bors rollup

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 21, 2017
bors added a commit that referenced this pull request Jun 21, 2017
Rollup of 4 pull requests

- Successful merges: #42397, #42620, #42762, #42766
- Failed merges:
@bors bors merged commit 2bec12f into rust-lang:master Jun 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants