@@ -1101,7 +1101,9 @@ fn writeln_impl<W: std::io::Write>(w: &mut W, w_uses: &mut HashSet<String, NonRa
1101
1101
} ,
1102
1102
( "Sync" , _, _) => { } , ( "Send" , _, _) => { } ,
1103
1103
( "std::marker::Sync" , _, _) => { } , ( "std::marker::Send" , _, _) => { } ,
1104
- ( "core::fmt::Debug" , _, _) => { } ,
1104
+ ( "core::fmt::Debug" , _, _) => {
1105
+ writeln!( w, "\t \t debug_str: {}_debug_str_void," , ident) . unwrap( ) ;
1106
+ } ,
1105
1107
( s, t, _) => {
1106
1108
if let Some ( supertrait_obj) = types. crate_types. traits. get( s) {
1107
1109
macro_rules! write_impl_fields {
@@ -1399,6 +1401,12 @@ fn writeln_impl<W: std::io::Write>(w: &mut W, w_uses: &mut HashSet<String, NonRa
1399
1401
1400
1402
writeln ! ( w, "\t }}.into()\n }}" ) . unwrap ( ) ;
1401
1403
}
1404
+ } else if path_matches_nongeneric ( & trait_path. 1 , & [ "core" , "fmt" , "Debug" ] ) {
1405
+ writeln ! ( w, "/// Get a string which allows debug introspection of a {} object" , ident) . unwrap ( ) ;
1406
+ writeln ! ( w, "pub extern \" C\" fn {}_debug_str_void(o: *const c_void) -> Str {{" , ident) . unwrap ( ) ;
1407
+
1408
+ write ! ( w, "\t alloc::format!(\" {{:?}}\" , unsafe {{ o as *const crate::{} }}).into()" , resolved_path) . unwrap ( ) ;
1409
+ writeln ! ( w, "}}" ) . unwrap ( ) ;
1402
1410
} else if path_matches_nongeneric ( & trait_path. 1 , & [ "Display" ] ) {
1403
1411
writeln ! ( w, "#[no_mangle]" ) . unwrap ( ) ;
1404
1412
writeln ! ( w, "/// Get the string representation of a {} object" , ident) . unwrap ( ) ;
0 commit comments