Remove usages of Span::DUMMY

This commit is contained in:
Lukas Wirth 2023-12-20 12:53:46 +01:00
parent f48ecb6e09
commit 4ec81230db
20 changed files with 90 additions and 87 deletions

View file

@ -116,18 +116,20 @@ pub struct MacroCallLoc {
pub krate: CrateId,
/// Some if this is a macro call for an eager macro. Note that this is `None`
/// for the eager input macro file.
// FIXME: This seems bad to save in an interned structure
eager: Option<Arc<EagerCallInfo>>,
pub kind: MacroCallKind,
pub call_site: SyntaxContextId,
pub call_site: Span,
}
// FIXME: Might make sense to intern this? Given it's gonna be the same for a bunch of macro calls
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct MacroDefId {
pub krate: CrateId,
pub kind: MacroDefKind,
pub local_inner: bool,
pub allow_internal_unsafe: bool,
// pub def_site: SyntaxContextId,
// pub def_site: Span,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
@ -348,7 +350,7 @@ impl MacroDefId {
db: &dyn db::ExpandDatabase,
krate: CrateId,
kind: MacroCallKind,
call_site: SyntaxContextId,
call_site: Span,
) -> MacroCallId {
db.intern_macro_call(MacroCallLoc { def: self, krate, eager: None, kind, call_site })
}