[core] codegen/types: Add docs for NDArrayType::fields

This commit is contained in:
David Mak 2024-11-25 15:58:42 +08:00
parent e1f34e9fe1
commit 652ed51bc6
1 changed files with 2 additions and 1 deletions

View File

@ -102,12 +102,13 @@ impl<'ctx> NDArrayType<'ctx> {
Ok(()) Ok(())
} }
// TODO: Move this into e.g. StructProxyType /// Returns an instance of [`StructFields`] containing all field accessors for this type.
#[must_use] #[must_use]
fn fields(ctx: &'ctx Context, llvm_usize: IntType<'ctx>) -> NDArrayStructFields<'ctx> { fn fields(ctx: &'ctx Context, llvm_usize: IntType<'ctx>) -> NDArrayStructFields<'ctx> {
NDArrayStructFields::new(ctx, llvm_usize) NDArrayStructFields::new(ctx, llvm_usize)
} }
/// See [`NDArrayType::fields`].
// TODO: Move this into e.g. StructProxyType // TODO: Move this into e.g. StructProxyType
#[must_use] #[must_use]
pub fn get_fields(&self, ctx: &'ctx Context) -> NDArrayStructFields<'ctx> { pub fn get_fields(&self, ctx: &'ctx Context) -> NDArrayStructFields<'ctx> {