You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When proc-macro2 has set feature nightly, parsing inside macro_rules becomes buggy. 0 < -1, which is comparison gets glued into 0 <- 1, which is assignment.
Reproduction
Tested using rustc 1.27.0-nightly (acd3871 2018-05-10).
Macro Cargo.toml
[package]
name = "macros"version = "0.1.0"
[lib]
proc-macro = true
[dependencies]
syn = { version = "0.13.10", features = ["full"] }
quote = "0.5.2"proc-macro2 = { version = "0.3.8" }
When proc-macro2 has set feature
nightly
, parsing insidemacro_rules
becomes buggy.0 < -1
, which is comparison gets glued into0 <- 1
, which is assignment.Reproduction
Tested using rustc 1.27.0-nightly (acd3871 2018-05-10).
Macro
Cargo.toml
Macro
lib.rs
Macro user
lib.rs
Output
Macro
Cargo.toml
modificationOutput after modification
The text was updated successfully, but these errors were encountered: