diff options
| author | Ralf Jung <post@ralfj.de> | 2023-08-05 08:21:35 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-08-05 08:21:35 +0200 |
| commit | e4540edf1a542716a0999c9eb79295ebbf5ede2d (patch) | |
| tree | 3c0d0b51ef035e50793b1ed24bd104855ecb0fa9 /compiler/rustc_codegen_llvm/src | |
| parent | b3a8e8eaa1c698f2decfffbf2ea2209766190485 (diff) | |
| parent | fca59ab5f0e7df7d816bed77a32abc0045ebe80b (diff) | |
| download | rust-e4540edf1a542716a0999c9eb79295ebbf5ede2d.tar.gz rust-e4540edf1a542716a0999c9eb79295ebbf5ede2d.zip | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/type_of.rs | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index cb093996d1d..3577fb2d951 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -985,7 +985,7 @@ impl<'tcx> LayoutOfHelpers<'tcx> for CodegenCx<'_, 'tcx> { #[inline] fn handle_layout_err(&self, err: LayoutError<'tcx>, span: Span, ty: Ty<'tcx>) -> ! { - if let LayoutError::SizeOverflow(_) = err { + if let LayoutError::SizeOverflow(_) | LayoutError::ReferencesError(_) = err { self.sess().emit_fatal(Spanned { span, node: err.into_diagnostic() }) } else { span_bug!(span, "failed to get layout for `{ty}`: {err:?}") diff --git a/compiler/rustc_codegen_llvm/src/type_of.rs b/compiler/rustc_codegen_llvm/src/type_of.rs index 32e71c6a641..2be7bce115d 100644 --- a/compiler/rustc_codegen_llvm/src/type_of.rs +++ b/compiler/rustc_codegen_llvm/src/type_of.rs @@ -61,9 +61,6 @@ fn uncached_llvm_type<'a, 'tcx>( } Some(name) } - // Use identified structure types for ADT. Due to pointee types in LLVM IR their definition - // might be recursive. Other cases are non-recursive and we can use literal structure types. - ty::Adt(..) => Some(String::new()), _ => None, }; |
