-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Existential_type compiler stack overflow #52977
Comments
A better example might be this: #![feature(existential_type)]
pub trait Bar<T> {
type Item;
}
existential type Foo: Bar<Foo, Item = Foo>;
fn crash(x: Foo) -> Foo {
x
}
fn main() {
} removing the |
Can you try running the compiler inside gdb and produce a backtrace? |
Backtrace:
|
It's recursing in rust/src/librustc_privacy/lib.rs Lines 742 to 754 in 215bf3a
Ideally this should cause cycle errors. But I'm assuming
Manually computes this without a query. Maybe we should just make |
Both examples now produce a cycle error. So we just need to add the two examples to |
Add some tests close rust-lang#52977 It seems that there are no tests for this issue, so I opened this PR. off-topic: I noticed [this test](https://github.com/rust-lang/rust/blob/master/src/test/ui/existential_types/nested_existential_types.rs)'s indents are bad, could I include commit to fix this, or should I separate? r? @oli-obk
Add some tests close rust-lang#52977 It seems that there are no tests for this issue, so I opened this PR. off-topic: I noticed [this test](https://github.com/rust-lang/rust/blob/master/src/test/ui/existential_types/nested_existential_types.rs)'s indents are bad, could I include commit to fix this, or should I separate? r? @oli-obk
Add some tests close rust-lang#52977 It seems that there are no tests for this issue, so I opened this PR. off-topic: I noticed [this test](https://github.com/rust-lang/rust/blob/master/src/test/ui/existential_types/nested_existential_types.rs)'s indents are bad, could I include commit to fix this, or should I separate? r? @oli-obk
Playing with the nighly's existential types, I stumbled upon a compiler stack overflow:
Error message:
The text was updated successfully, but these errors were encountered: