Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4dcf491

Browse files
committed
Use platform independent types
1 parent 8180e1b commit 4dcf491

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/test/ui/issues/issue-54410.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
use std::os::raw::c_char;
21
extern "C" {
3-
pub static mut symbol: [c_char];
2+
pub static mut symbol: [i8];
43
//~^ ERROR the size for values of type `[i8]` cannot be known at compilation time
54
}
65

src/test/ui/issues/issue-54410.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
2-
--> $DIR/issue-54410.rs:3:28
2+
--> $DIR/issue-54410.rs:2:28
33
|
4-
LL | pub static mut symbol: [c_char];
5-
| ^^^^^^^^ doesn't have a size known at compile-time
4+
LL | pub static mut symbol: [i8];
5+
| ^^^^ doesn't have a size known at compile-time
66
|
77
= help: the trait `std::marker::Sized` is not implemented for `[i8]`
88
= note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>

0 commit comments

Comments
 (0)