File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -119,13 +119,6 @@ impl Default for ModuleOrigin {
119
119
}
120
120
121
121
impl ModuleOrigin {
122
- pub ( crate ) fn not_sure_file ( file : Option < FileId > , declaration : AstId < ast:: Module > ) -> Self {
123
- match file {
124
- None => ModuleOrigin :: Inline { definition : declaration } ,
125
- Some ( definition) => ModuleOrigin :: File { declaration, definition } ,
126
- }
127
- }
128
-
129
122
fn declaration ( & self ) -> Option < AstId < ast:: Module > > {
130
123
match self {
131
124
ModuleOrigin :: File { declaration : module, .. }
Original file line number Diff line number Diff line change @@ -825,7 +825,10 @@ impl ModCollector<'_, '_> {
825
825
let modules = & mut self . def_collector . def_map . modules ;
826
826
let res = modules. alloc ( ModuleData :: default ( ) ) ;
827
827
modules[ res] . parent = Some ( self . module_id ) ;
828
- modules[ res] . origin = ModuleOrigin :: not_sure_file ( definition, declaration) ;
828
+ modules[ res] . origin = match definition {
829
+ None => ModuleOrigin :: Inline { definition : declaration } ,
830
+ Some ( definition) => ModuleOrigin :: File { declaration, definition } ,
831
+ } ;
829
832
for ( name, mac) in modules[ self . module_id ] . scope . collect_legacy_macros ( ) {
830
833
modules[ res] . scope . define_legacy_macro ( name, mac)
831
834
}
You can’t perform that action at this time.
0 commit comments