Skip to content

Commit 58da3fc

Browse files
committed
Auto merge of #14517 - Veykril:hir-def-refac, r=Veykril
internal: Shuffle around some hir_def modules
2 parents 3dd17bc + 3f5c992 commit 58da3fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+150
-145
lines changed

crates/hir-def/src/attr.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! A higher level attributes based on TokenTree, with also some shortcuts.
22
3+
pub mod builtin;
4+
35
#[cfg(test)]
46
mod tests;
57

crates/hir-def/src/body.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use syntax::{ast, AstPtr, SyntaxNode, SyntaxNodePtr};
2525
use crate::{
2626
attr::Attrs,
2727
db::DefDatabase,
28-
expr::{
28+
hir::{
2929
dummy_expr_id, Binding, BindingId, Expr, ExprId, Label, LabelId, Pat, PatId, RecordFieldPat,
3030
},
3131
item_scope::BuiltinShadowMode,

crates/hir-def/src/body/lower.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ use syntax::{
2626
};
2727

2828
use crate::{
29-
adt::StructKind,
30-
body::{Body, BodySourceMap, Expander, ExprPtr, LabelPtr, LabelSource, PatPtr},
31-
body::{BodyDiagnostic, ExprSource, PatSource},
29+
body::{
30+
Body, BodyDiagnostic, BodySourceMap, Expander, ExprPtr, ExprSource, LabelPtr, LabelSource,
31+
PatPtr, PatSource,
32+
},
3233
builtin_type::{BuiltinFloat, BuiltinInt, BuiltinUint},
34+
data::adt::StructKind,
3335
db::DefDatabase,
34-
expr::{
36+
hir::{
3537
dummy_expr_id, Array, Binding, BindingAnnotation, BindingId, ClosureKind, Expr, ExprId,
3638
FloatTypeWrapper, Label, LabelId, Literal, MatchArm, Movability, Pat, PatId,
3739
RecordFieldPat, RecordLitField, Statement,

crates/hir-def/src/body/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fmt::{self, Write};
55
use syntax::ast::HasName;
66

77
use crate::{
8-
expr::{Array, BindingAnnotation, BindingId, ClosureKind, Literal, Movability, Statement},
8+
hir::{Array, BindingAnnotation, BindingId, ClosureKind, Literal, Movability, Statement},
99
pretty::{print_generic_args, print_path, print_type_ref},
1010
type_ref::TypeRef,
1111
};

crates/hir-def/src/body/scope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_hash::FxHashMap;
88
use crate::{
99
body::Body,
1010
db::DefDatabase,
11-
expr::{Binding, BindingId, Expr, ExprId, LabelId, Pat, PatId, Statement},
11+
hir::{Binding, BindingId, Expr, ExprId, LabelId, Pat, PatId, Statement},
1212
BlockId, DefWithBodyId,
1313
};
1414

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/data.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! Contains basic data about various HIR declarations.
22
3+
pub mod adt;
4+
35
use std::sync::Arc;
46

57
use hir_expand::{name::Name, AstId, ExpandResult, HirFileId, InFile, MacroCallId, MacroDefKind};
File renamed without changes.

crates/hir-def/src/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use la_arena::ArenaMap;
99
use syntax::{ast, AstPtr};
1010

1111
use crate::{
12-
adt::{EnumData, StructData},
1312
attr::{Attrs, AttrsWithOwner},
1413
body::{scope::ExprScopes, Body, BodySourceMap},
1514
data::{
15+
adt::{EnumData, StructData},
1616
ConstData, FunctionData, ImplData, Macro2Data, MacroRulesData, ProcMacroData, StaticData,
1717
TraitAliasData, TraitData, TypeAliasData,
1818
},

0 commit comments

Comments
 (0)