diff --git a/crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs index f8626c5f62f..6105238d0b2 100644 --- a/crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs +++ b/crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs @@ -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 { - unimplemented!() + fn from_str(&mut self, s: &str) -> Result { + Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() }) } fn symbol(&mut self, literal: &Self::Literal) -> String { literal.text.to_string() diff --git a/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs b/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs index fb8a4c8cbe8..1cebc289f8a 100644 --- a/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs +++ b/crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs @@ -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 { - unimplemented!() + fn from_str(&mut self, s: &str) -> Result { + Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() }) } fn symbol(&mut self, literal: &Self::Literal) -> String { literal.text.to_string()