Skip to content

ICE immediate Scalar(alloc1) does not fit to layout TyAndLayout #121176

Open
@matthiaskrgr

Description

@matthiaskrgr

snippet:

use std::fmt::Debug;

static STATIC_1: dyn Debug + Sync = *();

fn main() {
    println!("{:?}", &STATIC_1);
}

Version information

rustc 1.78.0-dev
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.78.0-dev
LLVM version: 18.1.0

Command:
/home/matthias/.rustup/toolchains/local-debug-assertions/bin/rustc

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)A-mir-optArea: MIR optimizationsA-mir-opt-inliningArea: MIR inliningC-bugCategory: This is a bug.F-trivial_bounds`#![feature(trivial_bounds)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some way

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions