about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-13 02:08:33 +0000
committerbors <bors@rust-lang.org>2021-03-13 02:08:33 +0000
commit4d76b4ca52a65d63ab83d82d6630f1df8ec05a93 (patch)
tree0d5e3411672f54161a369a80e9f31fc612d323c1 /compiler/rustc_codegen_ssa/src
parent46a934a1dc789b9441e5fb5cd043287baddcc5c7 (diff)
parent684fa1977c687520d0b5b8fad45488ec1cba6da0 (diff)
downloadrust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.tar.gz
rust-4d76b4ca52a65d63ab83d82d6630f1df8ec05a93.zip
Auto merge of #83067 - JohnTitor:rollup-0wo338i, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #82984 (Simplify ast block lowering)
 - #83012 (Update Clippy)
 - #83020 (Emit the enum range assumption if the range only contains one element)
 - #83037 (Support merge_functions option in NewPM since LLVM >= 12)
 - #83052 (updated vulnerable deps)
 - #83059 (Allow configuring `rustdoc --disable-minification` in config.toml)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/rvalue.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
index 1795710ff53..629cb64d43e 100644
--- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs
@@ -325,7 +325,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
 
                                 let er = scalar.valid_range_exclusive(bx.cx());
                                 if er.end != er.start
-                                    && scalar.valid_range.end() > scalar.valid_range.start()
+                                    && scalar.valid_range.end() >= scalar.valid_range.start()
                                 {
                                     // We want `table[e as usize ± k]` to not
                                     // have bound checks, and this is the most