siderophile
siderophile copied to clipboard
Incorrect module paths for files not in an crate/src/ directory
siderophile naively looks for "src" occurring in the current Rust file path, and will sometimes overshoot the actual crate root. This sometimes gives output like
unsafe expr in function log::github::log_0::tests::filters::set_boxed_logger
since filters.rs presumably occurs in the tests/ directory of the log crate.
A neat fix would be to give a relative path to ast_walker::find_unsafe_in_file instead of an absolute path.