Unnamed repository; edit this file 'description' to name the repository.
| -rw-r--r-- | crates/hir-def/src/db.rs | 2 | ||||
| -rw-r--r-- | crates/hir-expand/src/change.rs | 3 | ||||
| -rw-r--r-- | crates/hir-expand/src/proc_macro.rs | 11 |
3 files changed, 5 insertions, 11 deletions
diff --git a/crates/hir-def/src/db.rs b/crates/hir-def/src/db.rs index 9d58a5331a..d1190686fc 100644 --- a/crates/hir-def/src/db.rs +++ b/crates/hir-def/src/db.rs @@ -46,7 +46,7 @@ pub trait DefDatabase: ExpandDatabase + SourceDatabase { /// Whether to expand procedural macros during name resolution. /// -/// Note: this struct shouldn't be exposed to downstream crates -- consider using +/// Note: this struct shouldn't be exposed to ide crates -- consider using /// [`set_expand_proc_attr_macros`] instead, if possible. #[salsa::input(singleton, debug)] pub(crate) struct ExpandProcAttrMacros { diff --git a/crates/hir-expand/src/change.rs b/crates/hir-expand/src/change.rs index 22dc2cbd71..f75f45983c 100644 --- a/crates/hir-expand/src/change.rs +++ b/crates/hir-expand/src/change.rs @@ -1,6 +1,6 @@ //! Defines a unit of change that can applied to the database to get the next //! state. Changes are transactional. -use base_db::{CrateGraphBuilder, FileChange, SourceRoot, salsa::Durability}; +use base_db::{CrateGraphBuilder, FileChange, SourceRoot}; use span::FileId; use crate::{db::ExpandDatabase, proc_macro::ProcMacrosBuilder}; @@ -17,7 +17,6 @@ impl ChangeWithProcMacros { if let Some(proc_macros) = self.proc_macros { proc_macros.build_in( db, - Durability::HIGH, crates_id_map .as_ref() .expect("cannot set proc macros without setting the crate graph too"), diff --git a/crates/hir-expand/src/proc_macro.rs b/crates/hir-expand/src/proc_macro.rs index 93bc5daa5b..94c105761d 100644 --- a/crates/hir-expand/src/proc_macro.rs +++ b/crates/hir-expand/src/proc_macro.rs @@ -84,13 +84,8 @@ impl ProcMacrosBuilder { ); } - /// Builds [`ProcMacros`] and adds id to `db` with the provided `durability`. - pub(crate) fn build_in( - self, - db: &mut dyn ExpandDatabase, - durability: Durability, - crates_id_map: &CratesIdMap, - ) { + /// Builds [`ProcMacros`] and adds id to `db` + pub(crate) fn build_in(self, db: &mut dyn ExpandDatabase, crates_id_map: &CratesIdMap) { let mut map = self .0 .into_iter() @@ -100,7 +95,7 @@ impl ProcMacrosBuilder { ProcMacros::try_get(db) .unwrap_or_else(|| ProcMacros::new(db, Default::default())) .set_by_crate(db) - .with_durability(durability) + .with_durability(Durability::HIGH) .to(map); } } |