-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: offset of not-statically-aligned field (...) cannot be computed statically
in rustc_middle/src/ty/layout.rs
#125805
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
Comments
Please don't fuzz for
|
Okay, I'll be careful from now on. |
After some investigation, I found that the ICE triggering code I report does not show ICE if every By the way, the reduced Regression in rust-lang-ci@fa215ae searched nightlies: from nightly-2023-01-01 to nightly-2024-05-30 bisected with cargo-bisect-rustc v0.6.8Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start=2023-01-01 --end=2024-05-30 --regress=ice --script=rustc --preserve -- 125805.rs |
ICE update Codetrait X<'a> {}
use std::mem::offset_of;
struct T {
y: X,
}
fn other() {
offset_of!(T, y);
}
fn main() {} Meta
Error outputCommand:
Backtrace
Note
|
offset of unsized field (type dyn [Binder(Trait(MyTrait<'_>), [])] + '{erased}) cannot be computed statically
with feature(builtin_syntax)
offset of not-statically-aligned field (...) cannot be computed statically
in rustc_middle/src/ty/layout.rs
Cannot reproduce on nightly 2024-8-12. Maybe already fixed. |
@rustbot label E-needs-test |
Code
(hand-reduced)
(original)
Meta
rustc --version --verbose
:Error output
Command:
rustc
Backtrace
Note
rustc_target/src/abi/mod.rs L272-L276
rust/compiler/rustc_target/src/abi/mod.rs
Lines 267 to 276 in 6f3df08
offset of unsized field (type dyn [Binder(Trait(std::fmt::Debug), [])] + '{erased}) cannot be computed statically
#125680 has identical ICE location, but has different query stack & feature.The text was updated successfully, but these errors were encountered: