-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Missing context lines for errors and warnings #57054
Comments
I just started seeing the same here on a wasm32-unknown-unknown library after the latest nightly update. Compiler: Happens both on warnings and errors, but not all of them. |
So, I was able to isolate this issue with my code. I don't know whether it's the same problem as @mqudsi is seeing, since it's related to web-sys. I went back in the nightlies as far as to pub fn push_operations(&mut self, operations: &Array) {
operations.for_each(&mut |operation, index, array| {
});
} The
All messages here are valid, but are missing the file and line information. They're all located in the same file as
As you can see, it's the same messages, but with a file and line number. So, it's the |
Here is a minimal demonstration of this behavior: Verified with
|
I have also encountered this issue, and after several hours of investigation: it seems to happen when a proc-macro is re-emitting tokens from a macro call. This can be reproduced in the playground: https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=a3c0361aeaaa7ed6257e79136f3aa6be Anything put into the function body that was put in by the macro will not have any associated line number. (This is also not limited to the wasm crate, but happens with any proc-macro as far as I noticed. The wasm crate is just available on the playground) |
This is probably caused by (and a duplicate of) #43081 |
This should be fixed by #72388 |
@mqudsi: Can you re-test on the latest nightly? |
I finally had some time to revisit the project that was triggering this for me and was not able to reproduce in a week of use. 👍 |
I'm working on a non-trivial project building with
rustc 1.33.0-nightly (93c2f055b 2018-12-15)
with athumbv7em-none-eabi
target, and I've run into an issue where something in the code breaks the compiler output (in both-v
and regular modes) such that it emits neither the location/line number of some errors nor the context in which the error occurred, but only for some errors:As you can see, while some of the warnings correctly show where they occurred, I have both warnings and error messages that are devoid of any context to help pin them down, e.g.
and more worryingly
I'm not able to reproduce this behavior in an MVP.
For reference,
rustc
is ultimately invoked as follows:The text was updated successfully, but these errors were encountered: