Line numbers in diagnostics for doctests are off by number of preceding hidden lines that aren't use core;
#122941
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Code
Note that the expression
x
occurs on line 3 in the source code.Current output
Note that the diagnostic refers to line 4.
Desired output
Rationale and extra context
No response
Other cases
No response
Rust Version
Anything else?
This doesn't always seem to happen, for example in the following example it does not:
I'm not sure what makes the difference. The only difference in the code is that one imports
playground::f
and the other importscore
.The text was updated successfully, but these errors were encountered: