Skip to content

Commit 12b069f

Browse files
committed
Move hir_def::keys to hir_def::dyn_map
1 parent 40c068f commit 12b069f

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

crates/hir-def/src/child_by_source.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ use syntax::ast::HasDocComments;
1010

1111
use crate::{
1212
db::DefDatabase,
13-
dyn_map::DynMap,
13+
dyn_map::{keys, DynMap},
1414
item_scope::ItemScope,
15-
keys,
1615
src::{HasChildSource, HasSource},
1716
AdtId, AssocItemId, DefWithBodyId, EnumId, EnumVariantId, FieldId, ImplId, Lookup, MacroId,
1817
ModuleDefId, ModuleId, TraitId, VariantId,

crates/hir-def/src/dyn_map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
//!
2222
//! This is a work of fiction. Any similarities to Kotlin's `BindingContext` are
2323
//! a coincidence.
24+
pub mod keys;
25+
2426
use std::{
2527
hash::Hash,
2628
marker::PhantomData,
File renamed without changes.

crates/hir-def/src/generics.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ use crate::{
2020
body::{Expander, LowerCtx},
2121
child_by_source::ChildBySource,
2222
db::DefDatabase,
23-
dyn_map::DynMap,
24-
keys,
23+
dyn_map::{keys, DynMap},
2524
src::{HasChildSource, HasSource},
2625
type_ref::{LifetimeRef, TypeBound, TypeRef},
2726
AdtId, ConstParamId, GenericDefId, HasModule, LifetimeParamId, LocalLifetimeParamId,

crates/hir-def/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub mod per_ns;
2424
pub mod item_scope;
2525

2626
pub mod dyn_map;
27-
pub mod keys;
2827

2928
pub mod item_tree;
3029

crates/hir/src/semantics/source_to_def.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//! expression, an item definition.
1515
//!
1616
//! Knowing only the syntax gives us relatively little info. For example,
17-
//! looking at the syntax of the function we can realise that it is a part of an
17+
//! looking at the syntax of the function we can realize that it is a part of an
1818
//! `impl` block, but we won't be able to tell what trait function the current
1919
//! function overrides, and whether it does that correctly. For that, we need to
2020
//! go from [`ast::Fn`] to [`crate::Function`], and that's exactly what this
@@ -88,9 +88,11 @@
8888
use base_db::FileId;
8989
use hir_def::{
9090
child_by_source::ChildBySource,
91-
dyn_map::DynMap,
91+
dyn_map::{
92+
keys::{self, Key},
93+
DynMap,
94+
},
9295
hir::{BindingId, LabelId},
93-
keys::{self, Key},
9496
AdtId, ConstId, ConstParamId, DefWithBodyId, EnumId, EnumVariantId, FieldId, FunctionId,
9597
GenericDefId, GenericParamId, ImplId, LifetimeParamId, MacroId, ModuleId, StaticId, StructId,
9698
TraitAliasId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId,

0 commit comments

Comments
 (0)