d51db24132
Cleanup path-to-local checks changelog: none It seemed like too much ceremony going on to check if an expression matches a variable. So I created two util functions `path_to_local(Expr) -> Option<HirId>` and `path_to_local_id(Expr, HirId) -> bool` to make this easier, and used them wherever applicable. I changed logic in a few places to use `HirId` instead of `Symbol` where it was easy to do so. I believe this is more correct and may even fix some bugs. I also removed some calls to `qpath_res`. This is not needed if you are only looking for a `Res::Local`. As a note, I wanted to name the util functions in a way that encourages understanding of the HIR. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |