Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs')
-rw-r--r--crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs
index ed49cc7596..f82f20c37b 100644
--- a/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs
+++ b/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs
@@ -486,8 +486,12 @@ impl server::Punct for RustAnalyzer {
}
impl server::Ident for RustAnalyzer {
- 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 new(&mut self, string: &str, span: Self::Span, is_raw: bool) -> Self::Ident {
+ IdentId(self.ident_interner.intern(&IdentData(tt::Ident::new_with_is_raw(
+ string.into(),
+ span,
+ is_raw,
+ ))))
}
fn span(&mut self, ident: Self::Ident) -> Self::Span {
@@ -559,13 +563,13 @@ impl server::Literal for RustAnalyzer {
fn f32(&mut self, n: &str) -> Self::Literal {
let n: f32 = n.parse().unwrap();
- let text = format!("{}f32", n);
+ let text = format!("{n}f32");
Literal { text: text.into(), id: tt::TokenId::unspecified() }
}
fn f64(&mut self, n: &str) -> Self::Literal {
let n: f64 = n.parse().unwrap();
- let text = format!("{}f64", n);
+ let text = format!("{n}f64");
Literal { text: text.into(), id: tt::TokenId::unspecified() }
}
@@ -574,11 +578,11 @@ impl server::Literal for RustAnalyzer {
for ch in string.chars() {
escaped.extend(ch.escape_debug());
}
- Literal { text: format!("\"{}\"", escaped).into(), id: tt::TokenId::unspecified() }
+ Literal { text: format!("\"{escaped}\"").into(), id: tt::TokenId::unspecified() }
}
fn character(&mut self, ch: char) -> Self::Literal {
- Literal { text: format!("'{}'", ch).into(), id: tt::TokenId::unspecified() }
+ Literal { text: format!("'{ch}'").into(), id: tt::TokenId::unspecified() }
}
fn byte_string(&mut self, bytes: &[u8]) -> Self::Literal {
@@ -589,7 +593,7 @@ impl server::Literal for RustAnalyzer {
.map(Into::<char>::into)
.collect::<String>();
- Literal { text: format!("b\"{}\"", string).into(), id: tt::TokenId::unspecified() }
+ Literal { text: format!("b\"{string}\"").into(), id: tt::TokenId::unspecified() }
}
fn span(&mut self, literal: &Self::Literal) -> Self::Span {