My requirement is simply to know the file path and line number that each "thing" (function, type. etc) is defined at.
I would like to write a small utility just for myself that helps to enforce my own brand of code layout and to do this, I need to know where things are defined.
I am hoping there is some crate I can use by providing a project path and it outputs something I can use to derive the above information.
I don't have code to share yet. I have been wanting something similar. I think the options are (1) syn, (2) rust-analyzer, (3) rustc, and (4) .. possibly clippy.
With syn, I do not think there is type info. I have not explored rust-analyzer much. With rustc, I could not get IntelliJ intellisense to work with HIR / THIR. I am currently wondering if Clippy might be the right approach -- since the linter already has logic to traverse the cargo workspace / find all the files / parse/typecheck everything, so it seems to have all the requisite machinery.