mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
implement Literal::from_str
This commit is contained in:
parent
a3830dfd3b
commit
a6df2b16df
2 changed files with 4 additions and 4 deletions
|
@ -488,8 +488,8 @@ impl server::Literal for Rustc {
|
||||||
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
||||||
"".to_owned()
|
"".to_owned()
|
||||||
}
|
}
|
||||||
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
|
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
|
||||||
unimplemented!()
|
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
|
||||||
}
|
}
|
||||||
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
||||||
literal.text.to_string()
|
literal.text.to_string()
|
||||||
|
|
|
@ -489,8 +489,8 @@ impl server::Literal for Rustc {
|
||||||
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
||||||
"".to_owned()
|
"".to_owned()
|
||||||
}
|
}
|
||||||
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
|
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
|
||||||
unimplemented!()
|
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
|
||||||
}
|
}
|
||||||
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
||||||
literal.text.to_string()
|
literal.text.to_string()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue