clean code: remove Deref<Target=RegionKind> impl for Region and use .kind()

Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
This commit is contained in:
xizheyin
2025-04-08 10:51:41 +08:00
parent c6c179662d
commit c7272a6cbc
49 changed files with 107 additions and 118 deletions

View File

@@ -368,7 +368,7 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
}
fn print_region(&mut self, region: ty::Region<'_>) -> Result<(), PrintError> {
let i = match *region {
let i = match region.kind() {
// Erased lifetimes use the index 0, for a
// shorter mangling of `L_`.
ty::ReErased => 0,