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

commit 1364b17a02f0353aee82e7ef37fcb48d97b5ec97
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Mon Feb 20 16:37:28 2023 +0100

    libproc_macro: Implement Debug for Group
    
    Implement the Debug trait for the rust Group external structure.
    
    ChangeLog:
    
            * librust/proc_macro/rust/bridge/group.rs: Derive Debug.
            * librust/proc_macro/rust/group.rs: Implement Debug.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 librust/proc_macro/rust/bridge/group.rs | 2 +-
 librust/proc_macro/rust/group.rs        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/librust/proc_macro/rust/bridge/group.rs b/librust/proc_macro/rust/bridge/group.rs
index 5a68d87d972..12c1b605c50 100644
--- a/librust/proc_macro/rust/bridge/group.rs
+++ b/librust/proc_macro/rust/bridge/group.rs
@@ -3,7 +3,7 @@ use std::fmt;
 use Delimiter;
 
 #[repr(C)]
-#[derive(Clone)]
+#[derive(Debug, Clone)]
 pub struct Group {
     delimiter: Delimiter,
     stream: bridge::token_stream::TokenStream,
diff --git a/librust/proc_macro/rust/group.rs b/librust/proc_macro/rust/group.rs
index 5b4bd6c710e..224fbada835 100644
--- a/librust/proc_macro/rust/group.rs
+++ b/librust/proc_macro/rust/group.rs
@@ -82,7 +82,7 @@ impl fmt::Display for Group {
 }
 
 impl fmt::Debug for Group {
-    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 Debug for Group 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).