-
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
Internal compiler error when lifetime bound is unsatisfied for generic associated type defined with impl trait. #88595
Labels
A-GATs
Area: Generic associated types (GATs)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
GATs-triaged
Issues using the `generic_associated_types` feature that have been triaged
glacier
ICE tracked in rust-lang/glacier.
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.
Comments
LlewVallis
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
Sep 2, 2021
jackh726
added
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
labels
Sep 2, 2021
matthiaskrgr
added a commit
to matthiaskrgr/glacier
that referenced
this issue
Sep 5, 2021
I ran into this issue just now, reproducible code: use core::iter;
pub trait ToIter<T> {
type Iter<'b>: Iterator<Item = &'b T>
where
T: 'b;
fn iter(&self) -> Self::Iter<'_>;
}
pub struct DrainRange<'a, T>(&'a T);
impl<'a, T> ToIter<T> for DrainRange<'a, T> {
type Iter<'b>
where
T: 'b,
= iter::FromFn<impl FnMut() -> Option<&'b T>>;
fn iter(&self) -> Self::Iter<'_> {
unimplemented!()
}
}
fn main() {} (note: this crashes on stable as well) full backtrace
|
Regression in `nightly-2021-07-17`
|
No longer ICEs since #89229 |
Alexendoo
added
the
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
label
Oct 20, 2021
GATs issue triage: not blocking. Fixed; needs test. |
jackh726
added
the
GATs-triaged
Issues using the `generic_associated_types` feature that have been triaged
label
Oct 23, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-GATs
Area: Generic associated types (GATs)
C-bug
Category: This is a bug.
E-needs-test
Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
F-generic_associated_types
`#![feature(generic_associated_types)]` a.k.a. GATs
F-type_alias_impl_trait
`#[feature(type_alias_impl_trait)]`
GATs-triaged
Issues using the `generic_associated_types` feature that have been triaged
glacier
ICE tracked in rust-lang/glacier.
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.
When implementing generic associated type using
impl Trait
, the compiler panics if the trait lifetime bound is not satisfied by duplicating the where clause.UPDATE: seems like the compiler also panics if an appropriate where clause is included in the implementation.
Reproducible in a new cargo project on the latest nightly.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: