about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorAndreas Liljeqvist <bonega@gmail.com>2021-08-22 21:46:03 +0200
committerAndreas Liljeqvist <bonega@gmail.com>2021-08-22 21:46:03 +0200
commit5a501f73ff753109c7e73d4981fe011633bd8e84 (patch)
tree4e687cca63f5373b65fc93056107eafcb2756e86 /compiler/rustc_codegen_llvm/src/builder.rs
parent7481e6d1a415853a96dcec11a052caaa02859b5a (diff)
downloadrust-5a501f73ff753109c7e73d4981fe011633bd8e84.tar.gz
rust-5a501f73ff753109c7e73d4981fe011633bd8e84.zip
Use custom wrap-around type instead of Range
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 2139f9776b7..2b72b167426 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -462,7 +462,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
             load: &'ll Value,
             scalar: &abi::Scalar,
         ) {
-            let vr = scalar.valid_range.clone();
+            let vr = scalar.valid_range;
             match scalar.value {
                 abi::Int(..) => {
                     let range = scalar.valid_range_exclusive(bx);
@@ -470,7 +470,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
                         bx.range_metadata(load, range);
                     }
                 }
-                abi::Pointer if vr.start() < vr.end() && !vr.contains(&0) => {
+                abi::Pointer if vr.start < vr.end && !vr.contains(0) => {
                     bx.nonnull_metadata(load);
                 }
                 _ => {}