-
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: assertion failed: self.scc_universes[scc] == ty::UniverseIndex::ROOT #108399
Comments
I can confirm that the previously emitted error of "unconstrained opaque type" is indeed bogus and is due to #108498. Here is a variant of #108498 that emits the same error: #![feature(type_alias_impl_trait)]
use std::future::Future;
type Opaque = impl Future;
async fn get_rpit() {}
fn query(_: impl FnOnce() -> Opaque) {}
fn test() {
query(get_rpit);
} The ICE here is what I expect due to #96146. So I think this should be closed in favor of these issues. |
I ran into this issue even without trait OutputStr<'a> {
type Output;
}
impl<'a> OutputStr<'a> for () {
type Output = &'a str;
}
fn test() -> impl for<'a> OutputStr<'a, Output = impl ToString> {} |
Another example, very similar to #108399 (comment) trait Tr<'a> {
type Assoc;
}
impl<'a> Tr<'a> for () {
type Assoc = &'a ()
}
fn g() -> impl for<'a> Tr<'a, Assoc = impl + 'a> {} |
Triage: Fixed on the latest nightly, @rustbot labels: +E-needs-test |
I think this issue might be covering two different problems, because as JohnTitor says, the code from the OP and aliemjay no longer causes an ICE on nightly, but the later examples by EqualMa and matthiaskrgr still do. |
Code
Meta
rustc --version --verbose
:required flags:
--edition=2021 --crate-type lib
Nightly
rustc 1.69.0-nightly (fdbc4329c 2023-02-22)
master rustc
rustc 1.69.0-nightly (07c993eba 2023-02-23)
:Backtrace
The text was updated successfully, but these errors were encountered: