-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
incremental compilation bug when shift left #11736
Comments
Thanks for the report! Unfortunately I am unable to reproduce what you are seeing. Can you run the following and post the entire output? cargo new foo
cd foo
rm src/main.rs
echo "fn main() { let a: i64 = 1 << 64; }" > src/main.rs
cargo run
rm src/main.rs
echo "fn main() { let a: i64 = 1 << 63; }" > src/main.rs
CARGO_LOG=cargo::core::compiler::fingerprint=trace,cargo_util::paths=trace cargo run -v Can you also provide the output of |
BTW, I test it on my macbook m1.
The result of
cargo -Vv is
|
Thanks for the info! I was able to reproduce and it appears to be a bug in the compiler. I have opened rust-lang/rust#108216 to track it there. |
Problem
It panicked:
Steps
and execute
cargo run
.The compiler will complain "attempt to shift left by
64_i32
, which would overflow".2. change code to
and execute
cargo run
, it'll also panic.3.
cargo clean
first and thencargo run
, it'll succeed.Possible Solution(s)
No response
Notes
No response
Version
The text was updated successfully, but these errors were encountered: