Skip to content

Commit 9ee855b

Browse files
bors[bot]Anatol Ulrich
andauthored
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 <anatol.ulrich@ferrous-systems.com>
2 parents 0bd2d23 + a6df2b1 commit 9ee855b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/proc_macro_srv/src/abis/abi_1_55/rustc_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ impl server::Literal for Rustc {
488488
// They must still be present to be ABI-compatible and work with upstream proc_macro.
489489
"".to_owned()
490490
}
491-
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
492-
unimplemented!()
491+
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
492+
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
493493
}
494494
fn symbol(&mut self, literal: &Self::Literal) -> String {
495495
literal.text.to_string()

crates/proc_macro_srv/src/abis/abi_1_56/rustc_server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,8 @@ impl server::Literal for Rustc {
489489
// They must still be present to be ABI-compatible and work with upstream proc_macro.
490490
"".to_owned()
491491
}
492-
fn from_str(&mut self, _s: &str) -> Result<Self::Literal, ()> {
493-
unimplemented!()
492+
fn from_str(&mut self, s: &str) -> Result<Self::Literal, ()> {
493+
Ok(Literal { text: s.into(), id: tt::TokenId::unspecified() })
494494
}
495495
fn symbol(&mut self, literal: &Self::Literal) -> String {
496496
literal.text.to_string()

0 commit comments

Comments
 (0)