Closed
Description
Test case:
#![feature(conservative_impl_trait)]
trait Quux {}
fn foo() -> impl Quux {
struct Foo<T>(T);
impl<T> Quux for Foo<T> {}
Foo(bar())
}
fn bar() -> impl Quux {
struct Bar<T>(T);
impl<T> Quux for Bar<T> {}
Bar(foo())
}
// effectively:
// struct Foo(Bar);
// struct Bar(Foo);
// should produce an error about infinite size
fn main() { foo(); }
Output:
thread 'rustc' has overflowed its stack
fatal runtime error: stack overflow
rustc --version --verbose
:
rustc 1.15.0-nightly (03bdaade2 2016-11-27)
binary: rustc
commit-hash: 03bdaade2a0c39118a5be927c667776a5de0d681
commit-date: 2016-11-27
host: x86_64-unknown-linux-gnu
release: 1.15.0-nightly
LLVM version: 3.9