Unnamed repository; edit this file 'description' to name the repository.
Merge #10680
10680: implement Literal::from_str r=jonas-schievink a=spookyvision
this apparently fixes RTIC 0.6's
```rust
#[rtic::app]
mod app {}
```
Co-authored-by: Anatol Ulrich <[email protected]>
| -rw-r--r-- | crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs | 4 | ||||
| -rw-r--r-- | crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs | 4 |
2 files changed, 4 insertions, 4 deletions
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 f8626c5f62..6105238d0b 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 @@ impl server::Literal for Rustc { // 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() 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 fb8a4c8cbe..1cebc289f8 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 @@ impl server::Literal for Rustc { // 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() |