mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
fix: Fix proc-macro server not using the supplied span in Ident::new
This commit is contained in:
parent
45ff51ba22
commit
f6def3ccdf
5 changed files with 8 additions and 48 deletions
|
@ -463,13 +463,8 @@ impl server::Punct for Rustc {
|
|||
}
|
||||
|
||||
impl server::Ident for Rustc {
|
||||
fn new(&mut self, string: &str, _span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(
|
||||
self.ident_interner.intern(&IdentData(tt::Ident {
|
||||
text: string.into(),
|
||||
id: tt::TokenId::unspecified(),
|
||||
})),
|
||||
)
|
||||
fn new(&mut self, string: &str, span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(self.ident_interner.intern(&IdentData(tt::Ident { text: string.into(), id: span })))
|
||||
}
|
||||
|
||||
fn span(&mut self, ident: Self::Ident) -> Self::Span {
|
||||
|
|
|
@ -463,13 +463,8 @@ impl server::Punct for Rustc {
|
|||
}
|
||||
|
||||
impl server::Ident for Rustc {
|
||||
fn new(&mut self, string: &str, _span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(
|
||||
self.ident_interner.intern(&IdentData(tt::Ident {
|
||||
text: string.into(),
|
||||
id: tt::TokenId::unspecified(),
|
||||
})),
|
||||
)
|
||||
fn new(&mut self, string: &str, span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(self.ident_interner.intern(&IdentData(tt::Ident { text: string.into(), id: span })))
|
||||
}
|
||||
|
||||
fn span(&mut self, ident: Self::Ident) -> Self::Span {
|
||||
|
|
|
@ -464,13 +464,8 @@ impl server::Punct for Rustc {
|
|||
}
|
||||
|
||||
impl server::Ident for Rustc {
|
||||
fn new(&mut self, string: &str, _span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(
|
||||
self.ident_interner.intern(&IdentData(tt::Ident {
|
||||
text: string.into(),
|
||||
id: tt::TokenId::unspecified(),
|
||||
})),
|
||||
)
|
||||
fn new(&mut self, string: &str, span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(self.ident_interner.intern(&IdentData(tt::Ident { text: string.into(), id: span })))
|
||||
}
|
||||
|
||||
fn span(&mut self, ident: Self::Ident) -> Self::Span {
|
||||
|
|
|
@ -468,13 +468,8 @@ impl server::Punct for Rustc {
|
|||
}
|
||||
|
||||
impl server::Ident for Rustc {
|
||||
fn new(&mut self, string: &str, _span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(
|
||||
self.ident_interner.intern(&IdentData(tt::Ident {
|
||||
text: string.into(),
|
||||
id: tt::TokenId::unspecified(),
|
||||
})),
|
||||
)
|
||||
fn new(&mut self, string: &str, span: Self::Span, _is_raw: bool) -> Self::Ident {
|
||||
IdentId(self.ident_interner.intern(&IdentData(tt::Ident { text: string.into(), id: span })))
|
||||
}
|
||||
|
||||
fn span(&mut self, ident: Self::Ident) -> Self::Span {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue