-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Compiler panic - $crate in proc macro #49706
Comments
Backtrace on rustc 1.27.0-nightly (48fa6f9 2018-04-05):
|
Is this truly a regression? It seems like it's "just an ICE"? If it is a regression, can we bisect? |
self-assigning to make sure we get answers to @nikomatsakis questions above. |
triage: P-high the priority reflects my interest in getting answers to those questins. but if its "just an ICE" and not much esle (and not a true regression) then we can readily downgrade to P-medium. |
Yes I believe this is a regression. If you change the But this is a macro_rules emitted by a custom derive which seems like a rehash of #46478, in which we decided we did not mean to support this anyway. |
Discussing in @rust-lang/compiler meeting. If indeed this is a rehash of #46478, then it seems we should close it. |
The following code uses the idea from proc-macro-hack to custom derive on a struct, return a macro from that derive and then invoke the macro.
I was trying what
$crate
would do in this context and expected that my code would just break.But instead the compiler broke:
This script reproduces the issue:
Meta
rustc 1.25.0-nightly (b1f8e6f 2018-02-22)
binary: rustc
commit-hash: b1f8e6f
commit-date: 2018-02-22
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 6.0
The text was updated successfully, but these errors were encountered: