-
-
Notifications
You must be signed in to change notification settings - Fork 774
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
Macros 1.1 #530
Macros 1.1 #530
Conversation
Some limitations:
Both panics are this:
EDIT: it is a rustc bug. |
@@ -36,51 +36,67 @@ include!(concat!(env!("OUT_DIR"), "/lib.rs")); | |||
include!("lib.rs.in"); | |||
|
|||
#[cfg(feature = "with-syntex")] | |||
pub fn expand<S, D>(src: S, dst: D) -> Result<(), syntex::Error> |
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.
Sorry for the confusing diff - this is just splitting expand
into expand
and expand_str
with common code in syntex_registry
.
Looks good to me! |
I added a test suite but we need to fix rust-lang/rust#36211 before it will pass. |
Macros 1.1 Tested with serde-rs/serde#530. This should be able to merge independently of rust-lang/rust#35957. r? @alexcrichton
Trying to use this, I get
|
@tikue you need a version of Cargo that supports rustc-macro crates. My Cargo PR merged a few hours ago so it will be in the next nightly. If you need it now you can build cargo yourself from the master branch. It should be as simple as cloning and running |
@dtolnay cool, thanks! |
RFC: 1681-macros-1.1.md
Implementation: rust-lang/rust#35957