Skip to content
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

Incorrect module paths for files not in an crate/src/ directory #2

Open
rozbb opened this issue May 21, 2019 · 0 comments
Open

Incorrect module paths for files not in an crate/src/ directory #2

rozbb opened this issue May 21, 2019 · 0 comments
Labels
invalid This doesn't seem right output mismatch Output of siderophile does not match the corresponding callgraph label

Comments

@rozbb
Copy link
Contributor

rozbb commented May 21, 2019

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.

@rozbb rozbb added invalid This doesn't seem right output mismatch Output of siderophile does not match the corresponding callgraph label labels May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right output mismatch Output of siderophile does not match the corresponding callgraph label
Projects
None yet
Development

No branches or pull requests

1 participant