Any recursive type will cause a stack overflow.
e.g.
#[derive(TypeHash)]
struct Recursive {
foo: Option<Box<Recursive>>,
}
Produces:
thread 'recursive_generic_type_terminates' has overflowed its stack
fatal runtime error: stack overflow
That simple example could be detected in the macro, but it can't in the general case. e.g. mutually recursive types:
#[derive(TypeHash)]
struct A {
foo: Option<Box<B>>,
}
#[derive(TypeHash)]
struct B {
foo: Option<Box<A>>,
}
Any recursive type will cause a stack overflow.
e.g.
Produces:
That simple example could be detected in the macro, but it can't in the general case. e.g. mutually recursive types: