Skip to content

Commit

Permalink
Merge pull request #500 from rust-lang/fix/type-kind
Browse files Browse the repository at this point in the history
Implement more type kinds
  • Loading branch information
antoyo authored Apr 20, 2024
2 parents 9941c35 + 89ee0f9 commit 4a52f95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/type_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!();
}
}

Expand Down
1 change: 0 additions & 1 deletion tests/failing-ui-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a52f95

Please sign in to comment.