about summary refs log tree commit diff
path: root/compiler/rustc_borrowck/src/diagnostics/mod.rs
diff options
context:
space:
mode:
authorxizheyin <xizheyin@smail.nju.edu.cn>2025-04-08 10:51:41 +0800
committerxizheyin <xizheyin@smail.nju.edu.cn>2025-04-08 10:51:41 +0800
commitc7272a6cbc999a187d564624594889532e47ffa0 (patch)
tree3cfa11b43aacbbac09936f5ed0ae35db9d01fc13 /compiler/rustc_borrowck/src/diagnostics/mod.rs
parentc6c179662d5a6fc0520e05b5c0682dcfc7333f77 (diff)
downloadrust-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_borrowck/src/diagnostics/mod.rs')
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs
index 899e145c2c0..5dcfe69857a 100644
--- a/compiler/rustc_borrowck/src/diagnostics/mod.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs
@@ -587,7 +587,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
         // this by hooking into the pretty printer and telling it to label the
         // lifetimes without names with the value `'0`.
         if let ty::Ref(region, ..) = ty.kind() {
-            match **region {
+            match region.kind() {
                 ty::ReBound(_, ty::BoundRegion { kind: br, .. })
                 | ty::RePlaceholder(ty::PlaceholderRegion {
                     bound: ty::BoundRegion { kind: br, .. },
@@ -607,7 +607,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
         let mut printer = ty::print::FmtPrinter::new(self.infcx.tcx, Namespace::TypeNS);
 
         let region = if let ty::Ref(region, ..) = ty.kind() {
-            match **region {
+            match region.kind() {
                 ty::ReBound(_, ty::BoundRegion { kind: br, .. })
                 | ty::RePlaceholder(ty::PlaceholderRegion {
                     bound: ty::BoundRegion { kind: br, .. },