Skip to content

Internal Status Access Violation with constant redefinition #135870

Closed
@TheIronBorn

Description

@TheIronBorn

Code

const FOO: usize = 32;
fn bar() {
    const FOO: usize = FOO;
}

Meta

rustc --version --verbose:

rustc 1.86.0-nightly (ed43cbcb8 2025-01-21)
binary: rustc
commit-hash: ed43cbcb882e7c06870abdd9305dc1f17eb9bab9
commit-date: 2025-01-21
host: x86_64-pc-windows-msvc
release: 1.86.0-nightly
LLVM version: 19.1.7

Error output

error: could not compile `testtest` (lib)

Caused by:
process didn't exit successfully: `C:\Users\<username>\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin\clippy-driver.exe C:\Users\<username>\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\bin\rustc.exe --crate-name testtest --edition=2024 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -Ctarget-cpu=native -Ztune-cpu=native -Ctarget-feature=+aes -Clink-arg=-fuse-ld=lld -Zthreads=4 --cfg "feature=\"default\"" --check-cfg cfg(docsrs,test) --check-cfg "cfg(feature, values(\"default\", \"rand\"))" -C metadata=10a1d148f727b426 -C extra-filename=-652f9f02f745d5a0 --out-dir C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\deps -C incremental=C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\incremental -L dependency=C:\Users\<username>\Rust_stuff\misc\testtest\target\debug\deps` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-parallel-compilerArea: parallel compilerC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️S-has-bisectionStatus: A bisection has been found for this issueS-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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions