Closed
Description
I tried this code:
#![feature(type_alias_impl_trait)]
type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug;
fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
i
}
fn main() {
let meh = 42;
let muh = 42;
assert_eq!(bar(&meh), bar(&muh));
}
I expected to see this happen: no stack overflow since this compiles fine
Instead, this happened: stack overflow
Meta
rustc --version --verbose
:
rustdoc 1.71.0-nightly (39c6804b9 2023-04-19)
binary: rustdoc
commit-hash: 39c6804b92aa202369e402525cee329556bc1db0
commit-date: 2023-04-19
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2
Backtrace
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
[1] 3823728 IOT instruction rustdoc