Skip to content

Commit cea7f2a

Browse files
committed
update gcc codegen to match new write_bytes signature
1 parent ebc94fb commit cea7f2a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_codegen_gcc/example/mini_core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ pub mod intrinsics {
677677
#[rustc_intrinsic]
678678
pub fn bswap<T>(x: T) -> T;
679679
#[rustc_intrinsic]
680-
pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize);
680+
pub unsafe fn write_bytes<T, B>(dst: *mut T, val: B, count: usize);
681681
#[rustc_intrinsic]
682682
pub unsafe fn unreachable() -> !;
683683
}

compiler/rustc_codegen_gcc/example/mini_core_hello_world.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsiz
127127

128128
unsafe fn zeroed<T>() -> T {
129129
let mut uninit = MaybeUninit { uninit: () };
130-
intrinsics::write_bytes(&mut uninit.value.value as *mut T, 0, 1);
130+
intrinsics::write_bytes(&mut uninit.value.value as *mut T, 0u8, 1);
131131
uninit.value.value
132132
}
133133

0 commit comments

Comments
 (0)