aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-02-20 16:37:28 +0100
committerPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>2023-03-30 13:52:31 +0200
commit1364b17a02f0353aee82e7ef37fcb48d97b5ec97 (patch)
treeaa6003b93624daec6cc8d62aa7e6bdbf7e536874
parent8901323c390b71b41ba11d1bcb9f166f2e15226c (diff)
downloadgcc-1364b17a02f0353aee82e7ef37fcb48d97b5ec97.zip
gcc-1364b17a02f0353aee82e7ef37fcb48d97b5ec97.tar.gz
gcc-1364b17a02f0353aee82e7ef37fcb48d97b5ec97.tar.bz2
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>
-rw-r--r--librust/proc_macro/rust/bridge/group.rs2
-rw-r--r--librust/proc_macro/rust/group.rs4
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 5a68d87..12c1b60 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 5b4bd6c..224fbad 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)
}
}