5 pub struct Bar { pub t: () }
7 impl<T> Access for T {}
9 fn field(&self, _: impl Sized, _: impl Sized) {
10 panic!("got into Access::field");
13 fn finish(&self) -> Result<(), std::fmt::Error> {
14 panic!("got into Access::finish");
17 fn debug_struct(&self, _: impl Sized, _: impl Sized) {
18 panic!("got into Access::debug_struct");
22 impl<T> MutAccess for T {}
24 fn field(&mut self, _: impl Sized, _: impl Sized) {
25 panic!("got into MutAccess::field");
28 fn finish(&mut self) -> Result<(), std::fmt::Error> {
29 panic!("got into MutAccess::finish");
32 fn debug_struct(&mut self, _: impl Sized, _: impl Sized) {
33 panic!("got into MutAccess::debug_struct");
38 let bar = Bar { t: () };
39 assert_eq!("Bar { t: () }", format!("{:?}", bar));