-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Panic during compiling/checking; maybe Rocket/Diesel/R2d2 macro use? #48941
Comments
|
I minimized https://github.com/ExpHP/Rocket-issue-48387
A function that just loops surely cannot be responsible for dropping a (I still rather doubt it is in |
So... I mentioned in the other issue how terrifying of a concept I thought For the uninitiated, rust/src/libsyntax/ext/expand.rs Lines 486 to 490 in 883e746
Do you see it? 😉 |
Ha! Thank you for the digging @ExpHP. That stray |
I'll probably submit a PR; I'm just browsing around the existing test cases for plugins trying to glean "best practices." (I'm also trying to see if there's any test case that causes the other #![feature(plugin, custom_derive, decl_macro)]
#![plugin(rocket_codegen)]
// (this gives a regular syntax error, not an ICE)
#[derive(FromForm, (|x| x am pure)(I))]
struct DairyCheese; |
Fix ICE on malformed plugin attributes See rust-lang#48941 for some discussion. This bug had several duplicate reports which were never closed as dupes: Fixes rust-lang#47612 Fixes rust-lang#48387 Fixes rust-lang#48941 Fixes rust-lang#48982
Hi! I'm trying to compile my Rocket/Diesel/R2d2 task management project, which has previously successfully compiled, and when I add the newest piece which relies on macros in some new/different way (sorry for vague, I'm new to rust) it starts failing to compile.
Looking at the backtrace, the error seems to be in MacroExpander::expand_invoc.
new code that causes the bug
expected behavior:
I expect it to have the same behavior as the simpler version of the route:
which warns about unused query result on compile but successfully runs, builds the NewTask struct from url components, and inserts it into the database.
result behavior
it fails to compile during cargo run, and the same exact error shows during cargo check. I've pasted the whole command with outputs here:
https://gist.github.com/haniawni/d333080a91c0370de6a245713f803c84
replication
Check out my project's "uhoh" branch for the exact code where I get the bug.
Check out my project's master branch at commit 5ec317 to see the functional version (requires a local postgresql instance and a DATABASE_URL env variable in a env file).
The text was updated successfully, but these errors were encountered: