about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2020-04-16 17:38:52 -0700
committerJosh Stone <jistone@redhat.com>2020-04-19 07:33:58 -0700
commit7b005c5fcb743e97b3cafee951b19fe7e51753c8 (patch)
treed5957a313d6f45c65b344b9c1bf6cf0247fd4409 /src/librustc_codegen_llvm
parent36b1a9296cde2b773771710e9bbd608fd2eca35f (diff)
Dogfood more or_patterns in the compiler
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/attributes.rs2
-rw-r--r--src/librustc_codegen_llvm/builder.rs4
-rw-r--r--src/librustc_codegen_llvm/lib.rs1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs
index 004de8d8ca9..ba286e5f40d 100644
--- a/src/librustc_codegen_llvm/attributes.rs
+++ b/src/librustc_codegen_llvm/attributes.rs
@@ -124,7 +124,7 @@ fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
     // sanitizer and thread sanitizer. With asan we're already protected from
     // stack overflow anyway so we don't really need stack probes regardless.
     match cx.sess().opts.debugging_opts.sanitizer {
-        Some(Sanitizer::Address) | Some(Sanitizer::Thread) => return,
+        Some(Sanitizer::Address | Sanitizer::Thread) => return,
         _ => {}
     }
 
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs
index da9060f043f..89bd96c1fe2 100644
--- a/src/librustc_codegen_llvm/builder.rs
+++ b/src/librustc_codegen_llvm/builder.rs
@@ -310,7 +310,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
         let new_kind = match ty.kind {
             Int(t @ Isize) => Int(t.normalize(self.tcx.sess.target.ptr_width)),
             Uint(t @ Usize) => Uint(t.normalize(self.tcx.sess.target.ptr_width)),
-            ref t @ Uint(_) | ref t @ Int(_) => t.clone(),
+            ref t @ (Uint(_) | Int(_)) => t.clone(),
             _ => panic!("tried to get overflow intrinsic for op applied to non-int type"),
         };
 
@@ -1247,7 +1247,7 @@ impl Builder<'a, 'll, 'tcx> {
         let emit = match opts.debugging_opts.sanitizer {
             // Some sanitizer use lifetime intrinsics. When they are in use,
             // emit lifetime intrinsics regardless of optimization level.
-            Some(Sanitizer::Address) | Some(Sanitizer::Memory) => true,
+            Some(Sanitizer::Address | Sanitizer::Memory) => true,
             _ => opts.optimize != config::OptLevel::No,
         };
         if !emit {
diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs
index 939f9e9c2a0..64158679740 100644
--- a/src/librustc_codegen_llvm/lib.rs
+++ b/src/librustc_codegen_llvm/lib.rs
@@ -11,6 +11,7 @@
 #![feature(extern_types)]
 #![feature(in_band_lifetimes)]
 #![feature(nll)]
+#![feature(or_patterns)]
 #![feature(trusted_len)]
 #![recursion_limit = "256"]