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
{{ message }}
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
There's an ongoing Rust interpreter issue related with your package on rust-lang/rust#62167, the following changeset reproduces the issue (the second format-less println! hangs the building process forever):
$ git diff
diff --git a/example/src/main.rs b/example/src/main.rs
index 127a36c..d72f1c2 100644
--- a/example/src/main.rs+++ b/example/src/main.rs@@ -1,7 +1,7 @@
use demo_hack::add_one;
fn main() {
- let two = 2;- let nine = add_one!(two) + add_one!(2 + 3);- println!("nine = {}", nine);+ let one = 1;+ println!("{}", add_one(one));+ println!(add_one!(one));
}
Then building triggers Rust's interpreter hanging forever with the example code above:
(base) brainstorm:proc-macro-hack romanvg$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
(base) brainstorm:proc-macro-hack romanvg$ cd example/
(base) brainstorm:example romanvg$ cargo build
Compiling example v0.0.0 (/Users/romanvg/tmp/proc-macro-hack/example)
Building [===================================================> ] 11/12: example(bin)
Can you give some feedback to the aforementioned rustlang issue? Thanks in advance!
I guess that the "nested macros" remark in proc-macro-hack limitations in the README.md relates directly to the core of the issue? The minimal code to trigger this is just a nested macro inside println!:
use demo_hack::add_one;fnmain(){println!(add_one!(1))}
I would really like to know what's going on here :)
I've already reported this as a compiler bug in rust-lang/rust#44692. This is not related to the documented limitation which is about calling one proc-macro-hack macro inside another (println is not a proc-macro-hack macro).
Hello @dtolnay,
There's an ongoing Rust interpreter issue related with your package on rust-lang/rust#62167, the following changeset reproduces the issue (the second format-less
println!
hangs the building process forever):Then building triggers Rust's interpreter hanging forever with the example code above:
Can you give some feedback to the aforementioned rustlang issue? Thanks in advance!
/cc dotenv-rs/dotenv#22
The text was updated successfully, but these errors were encountered: