Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/builtin_attr_macro.rs')
-rw-r--r--crates/hir-expand/src/builtin_attr_macro.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/crates/hir-expand/src/builtin_attr_macro.rs b/crates/hir-expand/src/builtin_attr_macro.rs
index 33ba6d37d5..9f77700bd0 100644
--- a/crates/hir-expand/src/builtin_attr_macro.rs
+++ b/crates/hir-expand/src/builtin_attr_macro.rs
@@ -1,6 +1,5 @@
//! Builtin attributes.
-use span::{FileId, MacroCallId, Span, SyntaxContextId, ROOT_ERASED_FILE_AST_ID};
-use syntax::{TextRange, TextSize};
+use span::{MacroCallId, Span};
use crate::{db::ExpandDatabase, name, tt, ExpandResult, MacroCallKind};
@@ -110,20 +109,13 @@ fn derive_attr_expand(
pub fn pseudo_derive_attr_expansion(
tt: &tt::Subtree,
args: &tt::Subtree,
- call_site: SyntaxContextId,
+ call_site: Span,
) -> ExpandResult<tt::Subtree> {
let mk_leaf = |char| {
tt::TokenTree::Leaf(tt::Leaf::Punct(tt::Punct {
char,
spacing: tt::Spacing::Alone,
- span: Span {
- range: TextRange::empty(TextSize::new(0)),
- anchor: span::SpanAnchor {
- file_id: FileId::BOGUS,
- ast_id: ROOT_ERASED_FILE_AST_ID,
- },
- ctx: call_site,
- },
+ span: call_site,
}))
};