diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2020-11-23 15:25:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-23 15:25:53 +0100 |
| commit | 064c3c146a51646c550ba84cd2c98bda70416485 (patch) | |
| tree | 52a70f3b28650502ac0055226d9288207841fc6a /compiler/rustc_codegen_llvm/src | |
| parent | a0cf162329c08caf1489e6838bfc24447c6f1029 (diff) | |
| parent | cd8973250dff50a2b71641659baa36c70ab3d57e (diff) | |
| download | rust-064c3c146a51646c550ba84cd2c98bda70416485.tar.gz rust-064c3c146a51646c550ba84cd2c98bda70416485.zip | |
Rollup merge of #79337 - LingMan:map, r=jyn514
Use Option::map instead of open coding it r? `@jonas-schievink` since you're frequently sniping these minor cleanups anyway. `@rustbot` modify labels +C-cleanup +T-compiler
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index 5e8ff14f0aa..96484034da7 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -1152,10 +1152,7 @@ impl<'ll> MemberDescription<'ll> { self.size.bits(), self.align.bits() as u32, self.offset.bits(), - match self.discriminant { - None => None, - Some(value) => Some(cx.const_u64(value)), - }, + self.discriminant.map(|v| cx.const_u64(v)), self.flags, self.type_metadata, ) |
