Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › llvm › Builder › Type › changeScalarAssumeCapacity Public Function changeScalarAssumeCapacity Doc Source Public Function std.zig.llvm.Builder.Type.changeScalarAssumeCapacity
pub fn changeScalarAssumeCapacity (self : Type , scalar : Type , builder : *Builder ) Type Params File zig/llvm/Builder.zig: 1297
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317 pub fn changeScalarAssumeCapacity (self : Type , scalar : Type , builder : *Builder ) Type {
if (self .isFloatingPoint ()) return scalar ;
const item = builder .type_items .items [@backingInt (self )];
return switch (item .tag ) {
.integer ,
.pointer ,
=> scalar ,
inline .vector ,
.scalable_vector ,
=> |kind | builder .vectorTypeAssumeCapacity (
switch (kind ) {
.vector => .normal ,
.scalable_vector => .scalable ,
else => unreachable ,
},
builder .typeExtraData (Type .Vector , item .data ).len ,
scalar ,
),
else => unreachable ,
};
}