@@ -109,8 +109,7 @@ pub use crate::{
109
109
pub use {
110
110
cfg:: { CfgAtom , CfgExpr , CfgOptions } ,
111
111
hir_def:: {
112
- attr:: { Attrs , AttrsWithOwner , Documentation } ,
113
- builtin_attr:: AttributeTemplate ,
112
+ attr:: { builtin:: AttributeTemplate , Attrs , AttrsWithOwner , Documentation } ,
114
113
data:: adt:: StructKind ,
115
114
find_path:: PrefixKind ,
116
115
import_map,
@@ -2697,22 +2696,22 @@ impl BuiltinAttr {
2697
2696
}
2698
2697
2699
2698
fn builtin ( name : & str ) -> Option < Self > {
2700
- hir_def:: builtin_attr :: find_builtin_attr_idx ( name)
2699
+ hir_def:: attr :: builtin :: find_builtin_attr_idx ( name)
2701
2700
. map ( |idx| BuiltinAttr { krate : None , idx : idx as u32 } )
2702
2701
}
2703
2702
2704
2703
pub fn name ( & self , db : & dyn HirDatabase ) -> SmolStr {
2705
2704
// FIXME: Return a `Name` here
2706
2705
match self . krate {
2707
2706
Some ( krate) => db. crate_def_map ( krate) . registered_attrs ( ) [ self . idx as usize ] . clone ( ) ,
2708
- None => SmolStr :: new ( hir_def:: builtin_attr :: INERT_ATTRIBUTES [ self . idx as usize ] . name ) ,
2707
+ None => SmolStr :: new ( hir_def:: attr :: builtin :: INERT_ATTRIBUTES [ self . idx as usize ] . name ) ,
2709
2708
}
2710
2709
}
2711
2710
2712
2711
pub fn template ( & self , _: & dyn HirDatabase ) -> Option < AttributeTemplate > {
2713
2712
match self . krate {
2714
2713
Some ( _) => None ,
2715
- None => Some ( hir_def:: builtin_attr :: INERT_ATTRIBUTES [ self . idx as usize ] . template ) ,
2714
+ None => Some ( hir_def:: attr :: builtin :: INERT_ATTRIBUTES [ self . idx as usize ] . template ) ,
2716
2715
}
2717
2716
}
2718
2717
}
@@ -2735,7 +2734,7 @@ impl ToolModule {
2735
2734
}
2736
2735
2737
2736
fn builtin ( name : & str ) -> Option < Self > {
2738
- hir_def:: builtin_attr :: TOOL_MODULES
2737
+ hir_def:: attr :: builtin :: TOOL_MODULES
2739
2738
. iter ( )
2740
2739
. position ( |& tool| tool == name)
2741
2740
. map ( |idx| ToolModule { krate : None , idx : idx as u32 } )
@@ -2745,7 +2744,7 @@ impl ToolModule {
2745
2744
// FIXME: Return a `Name` here
2746
2745
match self . krate {
2747
2746
Some ( krate) => db. crate_def_map ( krate) . registered_tools ( ) [ self . idx as usize ] . clone ( ) ,
2748
- None => SmolStr :: new ( hir_def:: builtin_attr :: TOOL_MODULES [ self . idx as usize ] ) ,
2747
+ None => SmolStr :: new ( hir_def:: attr :: builtin :: TOOL_MODULES [ self . idx as usize ] ) ,
2749
2748
}
2750
2749
}
2751
2750
}
0 commit comments