Error location of compilation error is missing if code is inside a rocket route handler #1456
Labels
deficiency
Something doesn't work as well as it could
upstream
An unresolvable issue: an upstream dependency bug
Bug Report
Version of Rocket
master (using stable Rust compiler rustc 1.47.0)
Operating system
windows (but also occurs on Linux)
Brief description of the bug
The diagnostic output (error location) of a compilation error is missing. The compilation error must be located inside the handler of a rocket route (only tested with attribute "get" so far). The code also must contain a closure. I would have expected the rust compiler to print the diagnostic details (the source code span where the error is located).
How to reproduce the issue
I could only reproduce the issue with the Rust stable compiler.
The rust nightly compiler will show the expected output:
Ideas, if any, about what Rocket is doing incorrectly
I first thought it might be due to the rocket codegen. But it seems it is a Rust compiler bug. With the nightly compiler the issue can not be reproduced.
General Comments
So far I wasn't able to determine the corresponding commit that seems to fix the issue in rust nightly. Still I thought it would be worth reporting as maybe also others are running into that issue.
The text was updated successfully, but these errors were encountered: