diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-08-25 18:05:10 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-08-30 00:44:09 +0300 |
| commit | 8e6d126b7d69281072f16dcc3cfff140e8947c58 (patch) | |
| tree | 293ebfbe26edb8e4baf22cec93eb517f2f1c6714 /compiler/rustc_codegen_cranelift/src/debuginfo | |
| parent | 87d1fb747f8ed3dde3cd36c17d1ef735872a7bf9 (diff) | |
| download | rust-8e6d126b7d69281072f16dcc3cfff140e8947c58.tar.gz rust-8e6d126b7d69281072f16dcc3cfff140e8947c58.zip | |
rustc_target: `TyAndLayout::field` should never error.
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs index c471da83de2..95216f1c3d7 100644 --- a/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/debuginfo/mod.rs @@ -160,12 +160,10 @@ impl<'tcx> DebugContext<'tcx> { for (field_idx, field_def) in variant.fields.iter().enumerate() { let field_offset = layout.fields.offset(field_idx); - let field_layout = layout - .field( - &layout::LayoutCx { tcx: self.tcx, param_env: ParamEnv::reveal_all() }, - field_idx, - ) - .unwrap(); + let field_layout = layout.field( + &layout::LayoutCx { tcx: self.tcx, param_env: ParamEnv::reveal_all() }, + field_idx, + ); let field_type = self.dwarf_ty(field_layout.ty); |
