Skip to content

rustdoc stack overflow TAIT #110629

Closed
@matthiaskrgr

Description

@matthiaskrgr

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

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions