public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] libproc_macro: Implement Display 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:82c0c5c5d9128ea173477638c5312f01d73837a1

commit 82c0c5c5d9128ea173477638c5312f01d73837a1
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Feb 20 16:14:51 2023 +0100

    libproc_macro: Implement Display on Literal
    
    Implement the Display trait on external rust structure Literal.
    
    ChangeLog:
    
            * librust/proc_macro/rust/literal.rs: Implement Display trait.
    
    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 02e78c61ca8..e829236baea 100644
--- a/librust/proc_macro/rust/literal.rs
+++ b/librust/proc_macro/rust/literal.rs
@@ -175,8 +175,8 @@ impl fmt::Debug for Literal {
 }
 
 impl fmt::Display for Literal {
-    fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        todo!("Implement this function")
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        self.0.fmt(f)
     }
 }

^ 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 Display 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).