Open
Description
I tried this code:
#[derive(Debug)]
struct Foo {
bar: u32
}
impl Default for Foo {
fn default()-> Self {
Self {
..Default::default()
}
}
}
fn main() {
println!("{:?}",Foo::default());
}
I expected to see this happen: Default values for each field
Instead, this happened: Infinite recursion and stack overflow
Discussion
I know that what I was trying to do is not a supported syntax, but the overflow can be hard to debug and the warning is not super clear.