-
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 when getting the size of a struct containing itself in an odd way #82830
Comments
This ICEs since 1.49.0. In 1.48.0,
|
bisection result searched nightlies: from nightly-2020-08-01 to nightly-2021-03-10 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2020-08-01 --regress=ice |
Assigning @rustbot label -I-prioritize +P-medium |
Issue: rust-lang/rust#82830
Slightly simplified: trait A<Y> { type B; }
type MaybeBox<T> = <T as A<T>>::B;
struct P { _t: MaybeBox<P> }
impl<Y> A<Y> for P {
type B = Box<P>;
}
fn main() {
let _t: MaybeBox<P>;
} |
No longer ICEs since #85868 |
Rollup of 5 pull requests Successful merges: - rust-lang#97302 (Do writeback of Closure params before visiting the parent expression) - rust-lang#97328 (rustc: Fix ICE in native library error reporting) - rust-lang#97351 (Output correct type responsible for structural match violation) - rust-lang#97398 (Add regression test for rust-lang#82830) - rust-lang#97400 (Fix a typo on Struct `Substructure`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Code
Meta
rustc --version --verbose
:Error output
Backtrace
The bug happens in here:
rust/compiler/rustc_codegen_llvm/src/context.rs
Line 785 in 4099208
It happens due to an assertion that the error is a
LayoutError::SizeOverflow
which it isn't i guess.I think it's related to a type being contained within itself, but not really.
The text was updated successfully, but these errors were encountered: