-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE when passing the result of .peekable() to recursive call #126920
Labels
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
adambiltcliffe
added
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jun 24, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 24, 2024
impressive. |
workingjubilee
added
the
T-types
Relevant to the types team, which will review and decide on the PR/issue.
label
Jun 24, 2024
saethlin
removed
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jun 24, 2024
This regressed in 1.45, from
And this program has never produced a good error. I've checked back to 1.26 when |
I tried to minimize the code to not depend on iterators, and now I've got a different ICE, which seems similar to #122823. ( #![allow(unconditional_recursion)]
fn conjure<T>() -> T {
unimplemented!()
}
struct Thing;
struct Wrap<T>(T);
trait HasItem {
type Item;
}
impl HasItem for Thing {
type Item = ();
}
impl<T: HasItem> HasItem for Wrap<T> {
type Item = T::Item;
}
struct ItemOf<T: HasItem>(T::Item);
fn bad<T: HasItem>() {
conjure::<ItemOf<Wrap<T>>>();
bad::<Wrap<T>>();
}
fn main() {
bad::<Thing>();
} Error output
|
duplicate of #118590 (comment) |
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.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: