Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack overflow in rustc_middle::ty::print::pretty::PrettyPrinter::pretty_print_type #71833

Closed
tadeokondrak opened this issue May 3, 2020 · 1 comment
Labels
C-bug Category: This is a bug.

Comments

@tadeokondrak
Copy link
Contributor

I tried this code:

struct Foo;
impl<'de> serde::Deserialize<'de> for Foo {
    fn deserialize<D: serde::Deserializer<'de>>(_: D) -> Result<Self, D::Error> {
        extern crate serde as _serde;
        struct Bar;
        impl<'de> _serde::Deserialize<'de> for Bar {}
    }
}
fn main() {}

I expected to see this happen:

An error message about how required functions are missing (but this is reduced from a program that should have compiled).

Instead, this happened:

thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow

Meta

rustc --version --verbose:

rustc 1.44.0-nightly (7f3df5772 2020-04-16)
binary: rustc
commit-hash: 7f3df5772439eee1c512ed2eb540beef1124d236
commit-date: 2020-04-16
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0

Backtrace: https://gist.github.com/tadeokondrak/2020c314ad4e1af21ae21e83351e1cb8

@tadeokondrak tadeokondrak added the C-bug Category: This is a bug. label May 3, 2020
@tadeokondrak
Copy link
Contributor Author

Whoops, duplicate of #55779. I was searching for a different function name at first which didn't show anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

1 participant