Skip to content

Commit 6d5c21a

Browse files
committed
resolve: Remove CStore::def_kind
1 parent 7a19282 commit 6d5c21a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

compiler/rustc_metadata/src/rmeta/decoder/cstore_impl.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,6 @@ impl CStore {
529529
)
530530
}
531531

532-
pub fn def_kind(&self, def: DefId) -> DefKind {
533-
self.get_crate_data(def.krate).def_kind(def.index)
534-
}
535-
536532
/// Only public-facing way to traverse all the definitions in a non-local crate.
537533
/// Critically useful for this third-party project: <https://github.com/hacspec/hacspec>.
538534
/// See <https://github.com/rust-lang/rust/pull/85889> for context.

compiler/rustc_resolve/src/build_reduced_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
114114
}
115115

116116
if !def_id.is_local() {
117-
let def_kind = self.cstore().def_kind(def_id);
117+
let def_kind = self.tcx.def_kind(def_id);
118118
if let DefKind::Mod | DefKind::Enum | DefKind::Trait = def_kind {
119119
let parent = self
120120
.tcx

0 commit comments

Comments
 (0)