Fix show error message when literal overflows in match patterns#94354
Fix show error message when literal overflows in match patterns#94354light4 wants to merge 3 commits intorust-lang:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @cjgillot (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
r? @Dylan-DPC |
|
@bors r+ rollup |
|
📌 Commit b0c4db3 has been approved by |
Fix show error message when literal overflows in match patterns Fix rust-lang#94239 This changes overflow behavior in [fn lit_to_const](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/thir/constant.rs#L10)
Fix show error message when literal overflows in match patterns Fix rust-lang#94239 This changes overflow behavior in [fn lit_to_const](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/thir/constant.rs#L10)
Fix show error message when literal overflows in match patterns Fix rust-lang#94239 This changes overflow behavior in [fn lit_to_const](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/thir/constant.rs#L10)
|
@bors r- I don't really have an explanation for this; in #94405 (comment) two PRs were already merged and the remaining two prs do not cause any functional changes so this pr is the only one thats left 🤔 |
|
The These files contains ❯ rg --fixed-strings --files-with-matches '#![allow(overflowing_literals)]'
library/stdarch/crates/intrinsic-test/src/main.rs
library/stdarch/crates/core_arch/src/x86/aes.rs
library/stdarch/crates/core_arch/src/x86/avx512bitalg.rs
library/stdarch/crates/core_arch/src/x86/avx512vaes.rs
library/stdarch/crates/core_arch/src/x86/avx512gfni.rs
library/stdarch/crates/core_arch/src/x86/pclmulqdq.rs
library/stdarch/crates/core_arch/src/x86/avx512vpclmulqdq.rs
src/test/ui/structs-enums/enum-discrim-autosizing.rs
src/test/ui/structs-enums/enum-discrim-width-stuff.rs
src/test/ui/structs-enums/enum-discrim-range-overflow.rs
src/test/ui/simd/target-feature-mixup.rs
src/test/ui/pattern/usefulness/issue-13727.rs
src/test/ui/packed/packed-struct-generic-layout.rs
src/test/ui/numbers-arithmetic/shift.rs
src/test/ui/numbers-arithmetic/i128.rs
src/test/ui/deriving/deriving-hash.rs
src/test/ui/consts/const-fn-val.rs
src/test/ui/consts/const-rec-and-tup.rs
src/test/ui/consts/const-negation.rs
src/test/ui/array-slice-vec/box-of-array-of-drop-1.rs
src/test/ui/array-slice-vec/box-of-array-of-drop-2.rs
src/test/ui/array-slice-vec/nested-vec-3.rs
src/doc/rust-by-example/src/types/cast.md
library/core/tests/num/dec2flt/mod.rs |
|
Closed due to cast behavior: https://doc.rust-lang.org/stable/rust-by-example/types/cast.html |
Fix #94239
This changes overflow behavior in fn lit_to_const