diff options
| author | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-08 10:51:41 +0800 |
|---|---|---|
| committer | xizheyin <xizheyin@smail.nju.edu.cn> | 2025-04-08 10:51:41 +0800 |
| commit | c7272a6cbc999a187d564624594889532e47ffa0 (patch) | |
| tree | 3cfa11b43aacbbac09936f5ed0ae35db9d01fc13 /compiler/rustc_middle/src/ty/fold.rs | |
| parent | c6c179662d5a6fc0520e05b5c0682dcfc7333f77 (diff) | |
| download | rust-c7272a6cbc999a187d564624594889532e47ffa0.tar.gz rust-c7272a6cbc999a187d564624594889532e47ffa0.zip | |
clean code: remove Deref<Target=RegionKind> impl for Region and use `.kind()`
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
Diffstat (limited to 'compiler/rustc_middle/src/ty/fold.rs')
| -rw-r--r-- | compiler/rustc_middle/src/ty/fold.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/fold.rs b/compiler/rustc_middle/src/ty/fold.rs index dc2c9e3d9f1..8dc73e4ce85 100644 --- a/compiler/rustc_middle/src/ty/fold.rs +++ b/compiler/rustc_middle/src/ty/fold.rs @@ -145,10 +145,10 @@ where } fn fold_region(&mut self, r: ty::Region<'tcx>) -> ty::Region<'tcx> { - match *r { + match r.kind() { ty::ReBound(debruijn, br) if debruijn == self.current_index => { let region = self.delegate.replace_region(br); - if let ty::ReBound(debruijn1, br) = *region { + if let ty::ReBound(debruijn1, br) = region.kind() { // If the callback returns a bound region, // that region should always use the INNERMOST // debruijn index. Then we adjust it to the |
