-
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
ICE: cannot relate region: LUB(ReErased, ReErased) #102510
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.
Comments
QuentinPerez
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 30, 2022
Minimized it a little #![feature(type_alias_impl_trait)]
use std::future::Future;
type X<T> = Box<dyn Future<Output = T>>;
trait Service {
type Something;
fn stream<'a, 'b>(&self) -> X<Self::Something>
where
'a: 'b;
}
impl Service for () {
type Something = impl Sized;
fn stream<'a, 'b>(&self) -> X<Self::Something>
where
'a: 'b,
{
Box::new(async move { std::iter::from_fn(|| Some(())) })
}
}
fn main() {} |
searched nightlies: from nightly-2022-01-01 to nightly-2022-09-30 bisected with cargo-bisect-rustc v0.6.4Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --access github --timeout 30 --start 2022-01-01 |
cc #98559 |
cc @jackh726 |
I get the same ICE when using the current nightly in a complex Codebase. |
I think I minimized this to: #![feature(type_alias_impl_trait)]
struct Output;
trait Service {
type OutputStream;
fn stream<'l, 'a>(&'l self) -> Self::OutputStream
where
Self: 'a,
'l: 'a;
}
trait Stream {
type Item;
}
struct ImplStream<F: Fn()>(F);
impl<F: Fn()> Stream for ImplStream<F> {
type Item = Output;
}
impl Service for () {
type OutputStream = impl Stream<Item = Output>;
fn stream<'l, 'a>(&'l self) -> Self::OutputStream
where
Self: 'a,
'l: 'a,
{
ImplStream(|| ())
}
}
fn main() {} |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 13, 2022
…li-obk replace ReErased with fresh region vars in opaque types See inline comments. Prior art rust-lang#102943. cc `@compiler-errors` `@oli-obk` Fixes rust-lang#100267 Fixes rust-lang#101940 Fixes rust-lang#102649 Fixes rust-lang#102510
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.
👋 Since the nightly 2022-09-11, the following code doesn't compile anymore.
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: