Skip to content

Commit 2f4c1bf

Browse files
committed
Update tests
1 parent 46c52c4 commit 2f4c1bf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/unit/out/unsafe/string_literals_c.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ unsafe fn main_0() -> i32 {
1919
b"c\0".as_ptr().cast_mut(),
2020
];
2121
let mut immutable_strings: [*const u8; 3] = [
22-
b"a\0".as_ptr().cast_mut(),
23-
b"b\0".as_ptr().cast_mut(),
24-
b"c\0".as_ptr().cast_mut(),
22+
b"a\0".as_ptr().cast_mut().cast_const(),
23+
b"b\0".as_ptr().cast_mut().cast_const(),
24+
b"c\0".as_ptr().cast_mut().cast_const(),
2525
];
2626
let mut mutable_string: *mut u8 = b"hello\0".as_ptr().cast_mut();
27-
let mut immutable_string: *const u8 = b"hello\0".as_ptr().cast_mut();
27+
let mut immutable_string: *const u8 = b"hello\0".as_ptr().cast_mut().cast_const();
2828
(unsafe {
2929
let _str: *mut u8 = b"world\0".as_ptr().cast_mut();
3030
foo_0(_str)

0 commit comments

Comments
 (0)