Skip to content

Commit

Permalink
update rust-analyzer to new interned struct
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Jan 24, 2025
1 parent 1965cf0 commit c85177e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions crates/base-db/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use vfs::{AbsPathBuf, FileId};
#[macro_export]
macro_rules! impl_intern_key {
($id:ident, $loc:ident) => {
#[salsa::interned_sans_lifetime(no_debug)]
#[salsa::interned(no_debug, no_lifetime)]
pub struct $id {
pub loc: $loc,
}
Expand Down Expand Up @@ -167,7 +167,7 @@ impl Files {
}
}

#[salsa::interned_sans_lifetime]
#[salsa::interned(no_lifetime)]
pub struct EditionedFileId {
pub file_id: FileText,
pub editioned_file_id: span::EditionedFileId,
Expand Down
4 changes: 2 additions & 2 deletions crates/hir-expand/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub trait ExpandDatabase: RootQueryDb {
fn syntax_context(&self, file: HirFileId, edition: Edition) -> SyntaxContextId;
}

#[salsa::interned_sans_lifetime(id = span::MacroCallId)]
#[salsa::interned(no_lifetime, id = span::MacroCallId)]
pub struct MacroCallWrapper {
pub loc: MacroCallLoc,
}
Expand All @@ -168,7 +168,7 @@ fn lookup_intern_macro_call(db: &dyn ExpandDatabase, macro_call: MacroCallId) ->
.clone()
}

#[salsa::interned_sans_lifetime(id = span::SyntaxContextId)]
#[salsa::interned(no_lifetime, id = span::SyntaxContextId)]
pub struct SyntaxContextWrapper {
pub data: SyntaxContextId,
}
Expand Down

0 comments on commit c85177e

Please sign in to comment.