Open ProfFan opened 1 month ago
Strange, this runs even after I removed the doctest itself, target
folder, as well as doing a cargo clean
. Does cargo
keep a cache of this test somewhere outside of the project?
...weird.
can you provide a version that compiles and repros?
...weird.
can you provide a version that compiles and repros?
https://github.com/ProfFan/icm426xx on main
I don't know if this is my macOS being funky, this is the only system I have.
Just run cargo test
and this should trigger?
nvm, it's this trick from stackoverflow that got me:
#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
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.
Same problem in this post.
Similar but not exact issue https://github.com/rust-lang/rust/issues/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
``` N/A ```