]> gcc.gnu.org Git - gcc.git/commitdiff
libproc_macro: Implement Debug for Group
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 20 Feb 2023 15:37:28 +0000 (16:37 +0100)
committerPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 30 Mar 2023 11:52:31 +0000 (13:52 +0200)
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>
librust/proc_macro/rust/bridge/group.rs
librust/proc_macro/rust/group.rs

index 5a68d87d972c01c679c904ed8a5a17c1cf9a71e2..12c1b605c50a10e0dfc7f40c30644bc81d993143 100644 (file)
@@ -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,
index 5b4bd6c710e306ee3adc2f65068aabda76c91e00..224fbada83520631aa6b34e2de26ec5e4752c766 100644 (file)
@@ -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)
     }
 }
This page took 0.0653 seconds and 5 git commands to generate.