flycheck doesn't handle complex macro errors
vvuk opened this issue · comments
With the following output:
error: invalid reference to argument `1` (there is 1 argument)
--> src\platform/mod.rs:18:5
|
18 | include!("windows/mod.rs");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src\platform\windows/mod.rs
|
824 | dd!("[c {:?}] send: dup sender handle -> {:?}", raw_remote_handle);
| ------------------------------------------------------------------- in this macro invocation
|
= note: this error originates in a macro from the standard library
rust-flycheck ends up just reporting nothing -- no errors/warnings/etc. I think this is an edge case with the new error style.
Thanks for the report.
So where does the output come from? Did you get it from the running cargo in the command line yourself?
If so, this might be related to #26. Can you try to invoke cargo rustc -- -Z no-trans
manually and see if the error appears?
From running cargo manually, yep. I'll give straight rustc a try when I get back to that machine, but I doubt that's the issue -- it's a macro error, so should be happening well before anything -Z no-trans
might disable.
-Z no-trans
reports the same error. I can construct a testcase for this if that would be helpful?
Testcase -- clone gist at https://gist.github.com/vvuk/37416f9ef49aefbff66e613dd6df0335
Note that if you comment out the dd!
line and uncomment out the println!
line you'll get a different type of error (where it'll report only the error on the include!
). I've filed this with rustc, but it can likely still happen regardless.
Thanks for the test case, it's definitely helpful! It's not a no-trans
issue, and since I can get the error as JSON from the compiler, it's likely an issue with our parser.
I'll look into it. Thanks a lot for reporting this.
Closing. Feel free to reopen if the issue pops again.