-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE with bad macro: IllFormedSpan #39848
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The smallest reproducing version I could find is:
Could not find any single variable macro examples, but it appears ICE requires that |
Verified playpen link on |
Here's a very different example that produces the same error: macro_rules! a {
() => (
b!( () )
);
}
macro_rules! b {
($expr:expr) => (
if true $expr
);
}
pub fn main() {
a!();
} The compiler does not panic if given pub fn main() {
b!( () );
} which is what the original version expands to. |
Checking the examples against todays stable, beta and nightly:
Just checked the original example through the playpen link, still ICE with nightly, same as with the shortened example. A link to playpen with @wirelyre example: https://is.gd/F5YCru which fails with an error on stable, ICE on both beta and nightly. The only change I can see is that now beta ICEs as well. |
This bug was introduced in a561ad8. |
This bug was fixed in |
Closes rust-lang#27078. Closes rust-lang#27985. Closes rust-lang#39848. Closes rust-lang#42164. Closes rust-lang#42479. Closes rust-lang#45152. Closes rust-lang#45662. Closes rust-lang#45876. Closes rust-lang#45965.
Tried to add a helper macro to work with
rust-protobuf
generated structs. The macro itself is illegal withoutconcat_idents
but it ICEs either way with latest nightly.I tried this code (playpen):
I expected this to see this happen: Current stable 1.15.1 reports this as a rather newbie-unfriendly error:
Same error is reported by play.rust-lang.org
1.16.0-beta.1 (5276ba72e 2017-01-31)
.Instead, this happened: With
1.17.0-nightly (956e2bcba 2017-02-12)
Meta
rustc --version --verbose
: For the ICE:Full output with RUST_BACKTRACE=1
The text was updated successfully, but these errors were encountered: