public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] libproc_macro: Implement FromStr on Literal
@ 2023-04-06 21:32 Thomas Schwinge
0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-06 21:32 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:eeda932733ec3841abdfe185af52b2ecd88d98e4
commit eeda932733ec3841abdfe185af52b2ecd88d98e4
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Feb 21 09:55:23 2023 +0100
libproc_macro: Implement FromStr on Literal
Implement FromStr trait on external Literal rust type.
ChangeLog:
* librust/proc_macro/rust/literal.rs: Implement FromStr.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diff:
---
librust/proc_macro/rust/literal.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/librust/proc_macro/rust/literal.rs b/librust/proc_macro/rust/literal.rs
index e829236baea..171ca56536e 100644
--- a/librust/proc_macro/rust/literal.rs
+++ b/librust/proc_macro/rust/literal.rs
@@ -183,7 +183,7 @@ impl fmt::Display for Literal {
impl FromStr for Literal {
type Err = LexError;
- fn from_str(_src: &str) -> Result<Self, LexError> {
- todo!("Implement this function")
+ fn from_str(src: &str) -> Result<Self, LexError> {
+ bridge::literal::Literal::from_str(src).map(Literal)
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-06 21:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 21:32 [gcc/devel/rust/master] libproc_macro: Implement FromStr on Literal Thomas Schwinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).