-
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
Hang with weird trait requirement #104225
Comments
cc @compiler-errors I believe this might related to what you were looking at recently |
Hm, don't think so? This doesn't have to with opaques that have higher-ranked (lifetime) vars in their substs. |
Ah! Fair enough, I misremembered what you were working on :) |
This doesn't even have to do with #![recursion_limit = "48"]
fn f<B>(x: Vec<[[[B; 1]; 1]; 1]>) {
is_eq::<_, B>(x);
}
fn is_eq<T: PartialEq<B>, B>(_: T) {}
fn main() {} I'll look into it regardless. |
…se-sugg, r=lcnr Fix hang in where-clause suggestion with `predicate_can_apply` Using `predicate_may_hold` during error reporting causes an evaluation overflow, which (because we use `evaluate_obligation_no_overflow`) then causes the predicate to need to be re-evaluated locally, which results in a hang. ... but since the "add a where clause" suggestion is best-effort, just throw any overflow errors. No need for 100% accuracy. r? `@lcnr` who has been thinking about overflows... Let me know if you want more context about this issue, and as always, feel free to reassign. Fixes rust-lang#104225
Revert rust-lang#104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently 😢 Reopens rust-lang#104225 Fixes rust-lang#104957 r? `@lcnr`
Revert rust-lang#104269 (to avoid spurious hang/test failure in CI) Causes hangs/memory overflows in the test suite apparently 😢 Reopens rust-lang#104225 Fixes rust-lang#104957 r? ``@lcnr``
Found with a modified fuzz-rustc.
Code
This input effectively hangs the compiler during
item_types_checking
/ trait selection.Time complexity
The time spent increases exponentially(?) with the complexity of type
x
and with the recursion_limit setting.#![recursion_limit = "16"]
#![recursion_limit = "32"]
#![recursion_limit = "48"]
#![recursion_limit = "128"]
(default)Regression
Regression in nightly-2022-05-28, from #96046. At the same time, the error message changed from E0275 to E0277.
Error before 2022-05-28
E0275: An evaluation of a trait requirement overflowed
Current error
E0277: trait requirement not satisfied
Version
rustc --version --verbose
:@rustbot label +I-compiletime +I-hang
The text was updated successfully, but these errors were encountered: