-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
doctest
line number is incorrect if used with #![doc = include_str!()]
#127893
Comments
doctest
repeats ignored test on macOSdoctest
repeats ignored/removed test on macOS
Strange, this runs even after I removed the doctest itself, |
...weird. can you provide a version that compiles and repros? |
https://github.com/ProfFan/icm426xx on I don't know if this is my macOS being funky, this is the only system I have. Just run |
nvm, it's this trick from stackoverflow that got me:
This results in doctest trying to run the code snippet from README. However this problem is still valid: the displayed line number is clearly incorrect. It shows the line number of my disabled test in the source code. |
doctest
repeats ignored/removed test on macOSdoctest
line number is incorrect if used with #![doc = include_str!()]
Same problem in this post. |
Similar but not exact issue #81070 |
I tried this code:
I expected to see this happen: the included doctests show the line number of the include statement.
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: