diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-06-02 15:23:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-02 15:23:46 +0200 |
| commit | c748c7b3febf5016ed1baa93448512e461dfb685 (patch) | |
| tree | 42db5a8d00e6c6eb27542825a3522225a2465606 /src/librustc_codegen_llvm | |
| parent | 538e17a3fdb517e0cd63f7c16d3292e7d710f7c7 (diff) | |
| parent | e82cd9528c127aff90d58a25573b9aeb43616c2b (diff) | |
| download | rust-c748c7b3febf5016ed1baa93448512e461dfb685.tar.gz rust-c748c7b3febf5016ed1baa93448512e461dfb685.zip | |
Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddyb
Fix some issues with `unwrap_usize` instead of `assert_usize` Fixes https://github.com/rust-lang/rust/issues/61337. Fixes https://github.com/rust-lang/rust/issues/61341. Fixes https://github.com/rust-lang/rust/issues/61422. r? @eddyb
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index b000628a3f7..42bd790ca2e 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -342,9 +342,7 @@ fn fixed_vec_metadata( let (size, align) = cx.size_and_align_of(array_or_slice_type); let upper_bound = match array_or_slice_type.sty { - ty::Array(_, len) => { - len.unwrap_usize(cx.tcx) as c_longlong - } + ty::Array(_, len) => len.unwrap_usize(cx.tcx) as c_longlong, _ => -1 }; |
