From 89ee0f997c8c30081e819e9b101d54befb038163 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 19 Apr 2024 20:58:35 -0400 Subject: [PATCH] Implement more type kinds --- src/type_.rs | 12 +++++++++++- tests/failing-ui-tests.txt | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/type_.rs b/src/type_.rs index 8fe3328ec55..d0d3c21f0cf 100644 --- a/src/type_.rs +++ b/src/type_.rs @@ -170,9 +170,19 @@ impl<'gcc, 'tcx> BaseTypeMethods<'tcx> for CodegenCx<'gcc, 'tcx> { TypeKind::Double } else if typ.is_vector() { TypeKind::Vector + } else if typ.get_pointee().is_some() { + TypeKind::Pointer + } else if typ.dyncast_array().is_some() { + TypeKind::Array + } else if typ.is_struct().is_some() { + TypeKind::Struct + } else if typ.dyncast_function_ptr_type().is_some() { + TypeKind::Function + } else if typ == self.type_void() { + TypeKind::Void } else { // TODO(antoyo): support other types. - TypeKind::Void + unimplemented!(); } } diff --git a/tests/failing-ui-tests.txt b/tests/failing-ui-tests.txt index 0b749918a3a..5df9381ecc7 100644 --- a/tests/failing-ui-tests.txt +++ b/tests/failing-ui-tests.txt @@ -36,7 +36,6 @@ tests/ui/parser/unclosed-delimiter-in-dep.rs tests/ui/simd/intrinsic/ptr-cast.rs tests/ui/consts/missing_span_in_backtrace.rs tests/ui/drop/dynamic-drop.rs -tests/ui/dyn-star/box.rs tests/ui/issues/issue-40883.rs tests/ui/issues/issue-43853.rs tests/ui/issues/issue-47364.rs