about summary refs log tree commit diff
path: root/compiler/rustc_transmute/src/maybe_transmutable
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-02-22 19:51:17 +0400
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-03-02 23:46:44 +0400
commitc83553da318a6d7e736d5a9e92b18fbdd3d76845 (patch)
treefdcaaf2e033da029ce2834e96a071915dbdc5655 /compiler/rustc_transmute/src/maybe_transmutable
parent7e966bcd03f6d0fae41f58cf80bcb10566ab971a (diff)
rustc_middle: Remove trait `DefIdTree`
This trait was a way to generalize over both `TyCtxt` and `Resolver`, but now `Resolver` has access to `TyCtxt`, so this trait is no longer necessary.
Diffstat (limited to 'compiler/rustc_transmute/src/maybe_transmutable')
-rw-r--r--compiler/rustc_transmute/src/maybe_transmutable/query_context.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs
index e4f3e7928da..0cae0377ee8 100644
--- a/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs
+++ b/compiler/rustc_transmute/src/maybe_transmutable/query_context.rs
@@ -58,9 +58,7 @@ mod rustc {
             use rustc_middle::ty;
 
             let parent = if let ty::Adt(adt_def, ..) = scope.kind() {
-                use rustc_middle::ty::DefIdTree;
-                let parent = self.parent(adt_def.did());
-                parent
+                self.parent(adt_def.did())
             } else {
                 // Is this always how we want to handle a non-ADT scope?
                 return false;