Conversation
Member
Author
|
Some limitations:
Both panics are this: EDIT: it is a rustc bug. |
| include!("lib.rs.in"); | ||
|
|
||
| #[cfg(feature = "with-syntex")] | ||
| pub fn expand<S, D>(src: S, dst: D) -> Result<(), syntex::Error> |
Member
Author
There was a problem hiding this comment.
Sorry for the confusing diff - this is just splitting expand into expand and expand_str with common code in syntex_registry.
Member
|
Looks good to me! |
Member
Author
|
I added a test suite but we need to fix rust-lang/rust#36211 before it will pass. |
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Sep 6, 2016
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 |
Member
Author
|
@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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC: 1681-macros-1.1.md
Implementation: rust-lang/rust#35957