bugformattergood first issueteam:tooling
仓库指标
- 星标
- (61,702 个星标)
- PR 合并指标
- (平均合并 22小时 6分钟) (30 天内合并 16 个 PR)
描述
To see the bug in practice see https://github.com/FuelLabs/sway/pull/7620
pub fn write<T>(self, val: T) {
if __size_of::<T>() == 0 { } else if __is_reference_type::<T>() { // <---- look here how strange it is
asm(dst: self, src: val, count: __size_of_val(val)) {
mcp dst src count;
};
} else if __size_of::<T>() == 1 {
asm(ptr: self, val: val) {
sb ptr val i0;
};
} else {
asm(ptr: self, val: val) {
sw ptr val i0;
};
}
}