2025-02-18 19:48:37 +01:00
|
|
|
#[prelude_import]
|
|
|
|
|
use ::std::prelude::rust_2015::*;
|
|
|
|
|
#[macro_use]
|
|
|
|
|
extern crate std;
|
|
|
|
|
//@ compile-flags: -Zunpretty=hir
|
|
|
|
|
//@ check-pass
|
|
|
|
|
|
|
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
|
|
struct Bar {
|
|
|
|
|
a: String,
|
|
|
|
|
b: u8,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl fmt::Debug for Bar {
|
2025-02-22 14:50:00 +01:00
|
|
|
fn fmt(&self, f: &'_ mut fmt::Formatter<'_>)
|
2025-02-18 19:48:37 +01:00
|
|
|
->
|
|
|
|
|
fmt::Result {
|
|
|
|
|
debug_struct_field2_finish(f, "Bar", "a", &self.a, "b", &&self.b)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-02-18 21:49:58 +01:00
|
|
|
fn debug_struct_field2_finish<'a>(name: &'_ str, name1: &'_ str,
|
|
|
|
|
value1: &'a dyn fmt::Debug, name2: &'_ str, value2: &'a dyn fmt::Debug)
|
|
|
|
|
-> fmt::Result { loop { } }
|