mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 09:23:31 +00:00
remove scalar size mismatch interpreter error, make it an ICE instead This error was added in https://github.com/rust-lang/rust/pull/71569 to deal with ICEs on incorrect Miri shim signatures. However, that was a partial fix: if the signature is "even more incorrect", using a non-scalar type where the type should be scalar, we still ICE. The proper fix is tracked in https://github.com/rust-lang/miri/issues/3842, and that is already used for a good chunk of our shims. I don't think it's worth keeping around the old, incomplete check here, so let's get rid of it. Sadly, the `to_$int` methods on `Scalar` still return a `Result` as they must still error if the scalar is a pointer and we are in const-eval where we cannot turn that pointer into an integer. We should probably use `ScalarInt` in a lot more places where we currently use `Scalar` to statically exclude this case... but that's a change for another time.