Try to compile:
#[derive(Debug)]
struct Foo {
ops: fn(&mut Foo),
}
fn main() {
}
Results in:
error[E0277]: `for<'r> fn(&'r mut Foo)` doesn't implement `std::fmt::Debug`
--> src/main.rs:3:5
|
3 | ops: fn(&mut Foo),
| ^^^^^^^^^^^^^^^^^ `for<'r> fn(&'r mut Foo)` cannot be formatted using `:?` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `for<'r> fn(&'r mut Foo)`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&for<'r> fn(&'r mut Foo)`
= note: required for the cast to the object type `std::fmt::Debug`
error: aborting due to previous error