ICE: Cannot Eq compare incompatible types *mut T/#0 and *const T/#0 #127089
Labels
C-bug
Category: This is a bug.
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.
Compiling the following code with
rustc -C opt-level=3 -o main main.rs
results in ICE.Strangely, this code compiles fine without
-C opt-level=3
. Replacestd::ptr::eq
with plain==
comparison also works.Code
main.rs
:Meta
rustc --version --verbose
:Error output
Backtrace
rustc-ice-2024-06-28T16_06_04-34433.txt
The text was updated successfully, but these errors were encountered: