From: Ian Jackson Date: Mon, 19 Feb 2024 19:30:51 +0000 (+0000) Subject: BAD NAMESPACE 2 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=7f619ec50b947e66774cde05e6e35237a43b905e;p=rust-experiments.git BAD NAMESPACE 2 --- diff --git a/src/main.rs b/src/main.rs index 5cb6a37..1d3ac3b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,9 +2,9 @@ use educe::Educe; use std::fmt; #[derive(Debug)] -pub struct RawString; +pub struct MyDebug; -impl RawString { +impl MyDebug { fn our_fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result { Ok(()) } @@ -13,15 +13,15 @@ impl RawString { #[derive(Educe)] #[educe(Debug(name = false))] pub struct Thing { - #[educe(Debug(method = "RawString::our_fmt"))] - field: RawString, + #[educe(Debug(method = "MyDebug::our_fmt"))] + field: MyDebug, #[educe(Debug(name(Q)))] other: u32, } fn main() { let a = Thing { - field: RawString, + field: MyDebug, other: 6, }; println!("{:?}", &a);