mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Replace ID based TokenMap with proper relative text-ranges / spans
This commit is contained in:
parent
f79439caed
commit
890eb17b4e
80 changed files with 1816 additions and 2046 deletions
|
@ -84,7 +84,7 @@ use nameres::DefMap;
|
|||
use stdx::impl_from;
|
||||
use syntax::ast;
|
||||
|
||||
use ::tt::token_id as tt;
|
||||
pub use hir_expand::tt;
|
||||
|
||||
use crate::{
|
||||
builtin_type::BuiltinType,
|
||||
|
@ -1341,15 +1341,13 @@ fn attr_macro_as_call_id(
|
|||
def: MacroDefId,
|
||||
) -> MacroCallId {
|
||||
let arg = match macro_attr.input.as_deref() {
|
||||
Some(AttrInput::TokenTree(tt)) => (
|
||||
{
|
||||
let mut tt = tt.0.clone();
|
||||
tt.delimiter = tt::Delimiter::UNSPECIFIED;
|
||||
tt
|
||||
},
|
||||
tt.1.clone(),
|
||||
),
|
||||
_ => (tt::Subtree::empty(), Default::default()),
|
||||
Some(AttrInput::TokenTree(tt)) => {
|
||||
let mut tt = tt.as_ref().clone();
|
||||
tt.delimiter = tt::Delimiter::UNSPECIFIED;
|
||||
tt
|
||||
}
|
||||
|
||||
_ => tt::Subtree::empty(),
|
||||
};
|
||||
|
||||
def.as_lazy_macro(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue