mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Use platform independent types
This commit is contained in:
parent
8180e1b54c
commit
4dcf49121c
@ -1,6 +1,5 @@
|
||||
use std::os::raw::c_char;
|
||||
extern "C" {
|
||||
pub static mut symbol: [c_char];
|
||||
pub static mut symbol: [i8];
|
||||
//~^ ERROR the size for values of type `[i8]` cannot be known at compilation time
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
error[E0277]: the size for values of type `[i8]` cannot be known at compilation time
|
||||
--> $DIR/issue-54410.rs:3:28
|
||||
--> $DIR/issue-54410.rs:2:28
|
||||
|
|
||||
LL | pub static mut symbol: [c_char];
|
||||
| ^^^^^^^^ doesn't have a size known at compile-time
|
||||
LL | pub static mut symbol: [i8];
|
||||
| ^^^^ doesn't have a size known at compile-time
|
||||
|
|
||||
= help: the trait `std::marker::Sized` is not implemented for `[i8]`
|
||||
= 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>
|
||||
|
Loading…
Reference in New Issue
Block a user