I tried this code:
fn main() {
test();
}
fn test() -> impl P {
Lazy { f: test }
}
trait P {}
struct Lazy<F> {
f: F
}
impl<F> P for Lazy<F> {}
Then I got thread 'rustc' has overflowed its stack.
Meta
rustc --version --verbose:
rustc 1.43.0-nightly (07a34df18 2020-02-08)
binary: rustc
commit-hash: 07a34df18b437319a7ff510077bbab95cf7ec6bc
commit-date: 2020-02-08
host: x86_64-pc-windows-gnu
release: 1.43.0-nightly
LLVM version: 9.0
I tried this code:
Then I got
thread 'rustc' has overflowed its stack.Meta
rustc --version --verbose: