implement Literal::from_str
This commit is contained in:
parent
a3830dfd3b
commit
a6df2b16df
@ -488,8 +488,8 @@ fn debug_kind(&mut self, _literal: &Self::Literal) -> String {
|
||||
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
||||
"".to_owned()
|
||||
}
|
||||
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
|
||||
unimplemented!()
|
||||
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
|
||||
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
|
||||
}
|
||||
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
||||
literal.text.to_string()
|
||||
|
@ -489,8 +489,8 @@ fn debug_kind(&mut self, _literal: &Self::Literal) -> String {
|
||||
// They must still be present to be ABI-compatible and work with upstream proc_macro.
|
||||
"".to_owned()
|
||||
}
|
||||
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
|
||||
unimplemented!()
|
||||
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
|
||||
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
|
||||
}
|
||||
fn symbol(&mut self, literal: &Self::Literal) -> String {
|
||||
literal.text.to_string()
|
||||
|
Loading…
Reference in New Issue
Block a user