diff options
| author | bors <bors@rust-lang.org> | 2019-03-28 21:46:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-28 21:46:30 +0000 |
| commit | 70a497a43794f0da5610c6da835ed3e02cd9af4d (patch) | |
| tree | a30edffbd2e98cb10926429a44ec9326db8bad10 /src/librustc_codegen_llvm/debuginfo | |
| parent | 237bf3244fffef501cf37d4bda00e1fce3fcfb46 (diff) | |
| parent | 0f26958cea7d8756b11b1c7fc4541974a6e6b0e1 (diff) | |
| download | rust-70a497a43794f0da5610c6da835ed3e02cd9af4d.tar.gz rust-70a497a43794f0da5610c6da835ed3e02cd9af4d.zip | |
Auto merge of #59487 - Centril:rollup, r=Centril
Rollup of 10 pull requests Successful merges: - #58717 (Add FromStr impl for NonZero types) - #59091 (Combine input and eval_always query types) - #59216 (Type dependent defs wrappers) - #59318 (rustc: Update linker flavor inference from filename) - #59320 (rustc: Allow using `clang` for wasm32 targets) - #59363 (#59361 Moved rustc edition opt to short list) - #59371 (ffi: rename VaList::copy to VaList::with_copy) - #59398 (Add a way to track Rustfix UI test coverage) - #59408 (compiletest: make path normalization smarter) - #59429 (When moving out of a for loop head, suggest borrowing it in nll mode) Failed merges: r? @ghost
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 8efa025e3dd..042a8c60cfa 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -22,6 +22,7 @@ use rustc::hir::CodegenFnAttrFlags; use rustc::hir::def::CtorKind; use rustc::hir::def_id::{DefId, CrateNum, LOCAL_CRATE}; use rustc::ich::NodeIdHashingMode; +use rustc::mir::interpret::truncate; use rustc_data_structures::fingerprint::Fingerprint; use rustc::ty::Instance; use rustc::ty::{self, AdtKind, ParamEnv, Ty, TyCtxt}; @@ -1368,7 +1369,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> { let value = (i.as_u32() as u128) .wrapping_sub(niche_variants.start().as_u32() as u128) .wrapping_add(niche_start); - let value = value & ((1u128 << niche.value.size(cx).bits()) - 1); + let value = truncate(value, niche.value.size(cx)); Some(value as u64) }; |
