Remove dead test code

This commit is contained in:
Lukas Wirth 2024-03-14 15:48:46 +01:00
parent d2f8eae2ec
commit d085ade631
10 changed files with 40 additions and 40 deletions

View file

@ -298,7 +298,6 @@ fn macro_def(db: &dyn DefDatabase, id: MacroId) -> MacroDefId {
}
};
// FIXME: The def site spans here are wrong, those should point to the name, not the whole ast node
match id {
MacroId::Macro2Id(it) => {
let loc: Macro2Loc = it.lookup(db);
@ -310,9 +309,7 @@ fn macro_def(db: &dyn DefDatabase, id: MacroId) -> MacroDefId {
kind: kind(loc.expander, loc.id.file_id(), makro.ast_id.upcast()),
local_inner: false,
allow_internal_unsafe: loc.allow_internal_unsafe,
span: db
.span_map(loc.id.file_id())
.span_for_range(db.ast_id_map(loc.id.file_id()).get(makro.ast_id).text_range()),
span: makro.def_site,
edition: loc.edition,
}
}
@ -328,9 +325,7 @@ fn macro_def(db: &dyn DefDatabase, id: MacroId) -> MacroDefId {
allow_internal_unsafe: loc
.flags
.contains(MacroRulesLocFlags::ALLOW_INTERNAL_UNSAFE),
span: db
.span_map(loc.id.file_id())
.span_for_range(db.ast_id_map(loc.id.file_id()).get(makro.ast_id).text_range()),
span: makro.def_site,
edition: loc.edition,
}
}
@ -348,6 +343,7 @@ fn macro_def(db: &dyn DefDatabase, id: MacroId) -> MacroDefId {
),
local_inner: false,
allow_internal_unsafe: false,
// FIXME: This is wrong, this should point to the name
span: db
.span_map(loc.id.file_id())
.span_for_range(db.ast_id_map(loc.id.file_id()).get(makro.ast_id).text_range()),