-
Notifications
You must be signed in to change notification settings - Fork 13.4k
ICE: -Zsave-analysis: The given Const
must be an ADT
#101739
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
C-bug
Category: This is a bug.
F-transmutability
`#![feature(transmutability)]`
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
reduced a bit #![feature(transmutability)]
mod assert {
use std::mem::BikeshedIntrinsicFrom;
pub fn is_transmutable<Src, Context, const ASSUME_ALIGNMENT: bool>()
where
Dst: BikeshedIntrinsicFrom<Src, Context, ASSUME_ALIGNMENT>,
{}
}
fn via_const() {
struct Context;
struct Src;
assert::is_transmutable::<Src, Context, false>();
} |
Const
must be an ADTConst
must be an ADT
matthiaskrgr
added a commit
to matthiaskrgr/glacier
that referenced
this issue
Sep 18, 2022
Merged
TaKO8Ki
added a commit
to TaKO8Ki/rust
that referenced
this issue
Oct 3, 2022
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 3, 2022
…iler-errors Fix ICE rust-lang#101739 Fixes a part of rust-lang#101739 This cannot cover the following case. It causes `too many args provided` error and obligation does not have references error. I want your advice to solve the following cases as well in this pull request or a follow-up. ```rust #![crate_type = "lib"] #![feature(transmutability)] #![allow(dead_code, incomplete_features, non_camel_case_types)] mod assert { use std::mem::BikeshedIntrinsicFrom; pub fn is_transmutable< Src, Dst, Context, const ASSUME_ALIGNMENT: bool, const ASSUME_LIFETIMES: bool, const ASSUME_VALIDITY: bool, const ASSUME_VISIBILITY: bool, >() where Dst: BikeshedIntrinsicFrom< Src, Context, ASSUME_ALIGNMENT, ASSUME_LIFETIMES, ASSUME_VALIDITY, ASSUME_VISIBILITY, >, {} } fn via_const() { struct Context; #[repr(C)] struct Src; #[repr(C)] struct Dst; const FALSE: bool = false; assert::is_transmutable::<Src, Dst, Context, FALSE, FALSE, FALSE, FALSE>(); } ```
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 3, 2022
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#102439 (rustdoc: re-sugar more cross-crate trait bounds) - rust-lang#102569 (Improve `FromStr` example) - rust-lang#102597 (Avoid ICE in printing RPITIT type) - rust-lang#102607 (Improve documentation of `slice::{from_ptr_range, from_ptr_range_mut}`) - rust-lang#102613 (Fix ICE rust-lang#101739) - rust-lang#102615 (Cleanup some error code explanations) - rust-lang#102617 (`HirId` for `deferred_transmute_checks`) - rust-lang#102620 (Migrate `.stab` elements style to CSS variables) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
C-bug
Category: This is a bug.
F-transmutability
`#![feature(transmutability)]`
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.
Code
Meta
rustc --version --verbose
:Error output
rustc 2abbbf3c158d6067aa29f0c337a40e687485635b.rs -Zsave-analysis
Backtrace
The text was updated successfully, but these errors were encountered: