Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/nameres/assoc.rs')
| -rw-r--r-- | crates/hir-def/src/nameres/assoc.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir-def/src/nameres/assoc.rs b/crates/hir-def/src/nameres/assoc.rs index b67853347b..9d2b2109fb 100644 --- a/crates/hir-def/src/nameres/assoc.rs +++ b/crates/hir-def/src/nameres/assoc.rs @@ -165,7 +165,7 @@ impl<'a> AssocItemCollector<'a> { local_def_map, ast_id_map: db.ast_id_map(file_id), span_map: db.span_map(file_id), - cfg_options: module_id.krate.cfg_options(db), + cfg_options: module_id.krate(db).cfg_options(db), file_id, container, items: Vec::new(), @@ -197,7 +197,7 @@ impl<'a> AssocItemCollector<'a> { AttrsOrCfg::Enabled { attrs } => attrs, AttrsOrCfg::CfgDisabled(cfg) => { self.diagnostics.push(DefDiagnostic::unconfigured_code( - self.module_id.local_id, + self.module_id, InFile::new(self.file_id, ast_id.erase()), cfg.0, self.cfg_options.clone(), @@ -213,7 +213,7 @@ impl<'a> AssocItemCollector<'a> { match self.def_map.resolve_attr_macro( self.local_def_map, self.db, - self.module_id.local_id, + self.module_id, ast_id_with_path, attr, attr_id, @@ -226,9 +226,9 @@ impl<'a> AssocItemCollector<'a> { // crate failed), skip expansion like we would if it was // disabled. This is analogous to the handling in // `DefCollector::collect_macros`. - if let Some(err) = exp.as_expand_error(self.module_id.krate) { + if let Some(err) = exp.as_expand_error(self.module_id.krate(self.db)) { self.diagnostics.push(DefDiagnostic::macro_error( - self.module_id.local_id, + self.module_id, ast_id, (*attr.path).clone(), err, @@ -244,7 +244,7 @@ impl<'a> AssocItemCollector<'a> { Ok(_) => (), Err(_) => { self.diagnostics.push(DefDiagnostic::unresolved_macro_call( - self.module_id.local_id, + self.module_id, MacroCallKind::Attr { ast_id, attr_args: None, @@ -307,7 +307,7 @@ impl<'a> AssocItemCollector<'a> { .resolve_path( self.local_def_map, self.db, - self.module_id.local_id, + self.module_id, path, crate::item_scope::BuiltinShadowMode::Other, Some(MacroSubNs::Bang), @@ -322,7 +322,7 @@ impl<'a> AssocItemCollector<'a> { &path, ctxt, ExpandTo::Items, - self.module_id.krate(), + self.module_id.krate(self.db), resolver, &mut |ptr, call_id| { self.macro_calls.push((ptr.map(|(_, it)| it.upcast()), call_id)) @@ -338,7 +338,7 @@ impl<'a> AssocItemCollector<'a> { }, Err(_) => { self.diagnostics.push(DefDiagnostic::unresolved_macro_call( - self.module_id.local_id, + self.module_id, MacroCallKind::FnLike { ast_id, expand_to: ExpandTo::Items, |