diff options
| author | Yuki Okushi <huyuumi.dev+love@gmail.com> | 2022-11-07 09:46:26 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-07 09:46:26 +0900 |
| commit | 06e261aaf57e49c5650513f5ab262c20f1e7ebfe (patch) | |
| tree | a1abcff68c7fe78ce55e6c00e4c291c61d1e5435 /compiler/rustc_codegen_ssa/src | |
| parent | 19c780ab1361efdb2a416f035e87dd9140d63901 (diff) | |
| parent | 299bc61035466b3e6ce0af78d19996a5eef6e294 (diff) | |
| download | rust-06e261aaf57e49c5650513f5ab262c20f1e7ebfe.tar.gz rust-06e261aaf57e49c5650513f5ab262c20f1e7ebfe.zip | |
Rollup merge of #104045 - Ayush1325:type_array, r=nikic
Add type_array to BaseTypeMethods Moved `type_array` function to `rustc_codegen_ssa::BaseTypeMethods` trait. This allows using normal `alloca` function to create arrays as suggested in https://github.com/rust-lang/rust/pull/104022. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/type_.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/type_.rs b/compiler/rustc_codegen_ssa/src/traits/type_.rs index bdc6a91cf6a..86481d5d758 100644 --- a/compiler/rustc_codegen_ssa/src/traits/type_.rs +++ b/compiler/rustc_codegen_ssa/src/traits/type_.rs @@ -22,6 +22,7 @@ pub trait BaseTypeMethods<'tcx>: Backend<'tcx> { fn type_f32(&self) -> Self::Type; fn type_f64(&self) -> Self::Type; + fn type_array(&self, ty: Self::Type, len: u64) -> Self::Type; fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type; fn type_struct(&self, els: &[Self::Type], packed: bool) -> Self::Type; fn type_kind(&self, ty: Self::Type) -> TypeKind; |
