-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix show error message when literal overflows in match patterns #94354
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