-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Type checking for this incorrect impl trait panics with incremental compilation #87549
Comments
I seem to have run into the same issue with this code: pub struct Table<T, const N: usize>([Option<T>; N]);
impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
type IntoIter = ::core::iter::Flatten<::core::slice::Iter<'a, T>>;
type Item = &'a T;
fn into_iter(self) -> Self::IntoIter {
unimplemented!()
}
}
Backtrace
|
I believe these ICEs trigger because of / are made visible by #83898 cc @Aaron1011 @estebank. |
I'm not able to repro this with rustc 1.56.0-nightly (e3b1c12 2021-08-02):
Could you verify that you see it with a recent nightly? There have been significant changes in this area recently. Edit: ah! with
|
This comment has been minimized.
This comment has been minimized.
Do not ICE on HIR based WF check when involving lifetimes Fix rust-lang#87549.
Do not ICE on HIR based WF check when involving lifetimes Fix rust-lang#87549.
Do not ICE on HIR based WF check when involving lifetimes Fix rust-lang#87549.
When trying to compile this incorrect code using cargo, nightly rustc panics.
When compiling using rustc directly without further arguments (or using the same command cargo calls with
-C incremental=...
removed), it outputs an error message instead.Code
I also noticed that changing
type N = &'t ();
totype N = ();
will also result in an error message instead of a panic.Meta
rustc --version --verbose
:Error output
cargo +nightly --verbose run
Backtrace
RUST_BACKTRACE=1 cargo +nightly --verbose run
The text was updated successfully, but these errors were encountered: