about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-17 18:18:21 +0200
committerGitHub <noreply@github.com>2024-08-17 18:18:21 +0200
commit4e6147d956e05f2f28b6fdf0d9d7c18bce603906 (patch)
tree63ceeaa02f46b1d34afa6732432d396e44192ee4 /compiler/rustc_pattern_analysis/src
parent8a023b31bd408868d4fa6493a657a32ab1b30868 (diff)
parent194ade1267f2bb66cb53626679944e195850bdcf (diff)
downloadrust-4e6147d956e05f2f28b6fdf0d9d7c18bce603906.tar.gz
rust-4e6147d956e05f2f28b6fdf0d9d7c18bce603906.zip
Rollup merge of #129196 - Zalathar:ref-id-ref, r=compiler-errors
Remove a useless ref/id/ref round-trip from `pattern_from_hir`

This re-lookup of `&hir::Pat` by its ID appears to be an artifact of earlier complexity that has since been removed from the compiler.

Merely deleting the let/match results in borrow errors, but sprinkling `'tcx` in the signature allows it to work again, so I suspect that this code's current function is simply to compensate for overly loose lifetimes in the signature. Perhaps it made more sense at a time when HIR lifetimes were not tied to `'tcx`.

I spotted this while working on some more experimental changes, which is why I've extracted it into its own PR.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions