Skip to content

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

@rozbb

Description

@rozbb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightoutput mismatchOutput of siderophile does not match the corresponding callgraph label

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions