about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/errors
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_trait_selection/src/errors
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_trait_selection/src/errors')
-rw-r--r--compiler/rustc_trait_selection/src/errors/note_and_explain.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/errors/note_and_explain.rs b/compiler/rustc_trait_selection/src/errors/note_and_explain.rs
index 46622246a17..e4ab78b6247 100644
--- a/compiler/rustc_trait_selection/src/errors/note_and_explain.rs
+++ b/compiler/rustc_trait_selection/src/errors/note_and_explain.rs
@@ -20,7 +20,7 @@ impl<'a> DescriptionCtx<'a> {
         region: ty::Region<'tcx>,
         alt_span: Option<Span>,
     ) -> Option<Self> {
-        let (span, kind, arg) = match *region {
+        let (span, kind, arg) = match region.kind() {
             ty::ReEarlyParam(br) => {
                 let scope = tcx
                     .parent(tcx.generics_of(generic_param_scope).region_param(br, tcx).def_id)