Skip to content

Document the equivalence of libc sized integer types to Rust types. #29223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/liblibc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,36 @@ pub mod types {
pub enum fpos_t {}
}
pub mod c99 {
/// An alias for `i8` using the C name from `<stdint.h>`. Use `i8`
/// instead.
pub type int8_t = i8;

/// An alias for `i16` using the C name from `<stdint.h>`. Use `i16`
/// instead.
pub type int16_t = i16;

/// An alias for `i32` using the C name from `<stdint.h>`. Use `i32`
/// instead.
pub type int32_t = i32;

/// An alias for `i64` using the C name from `<stdint.h>`. Use `i64`
/// instead.
pub type int64_t = i64;

/// An alias for `u8` using the C name from `<stdint.h>`. Use `u8`
/// instead.
pub type uint8_t = u8;

/// An alias for `u16` using the C name from `<stdint.h>`. Use `u16`
/// instead.
pub type uint16_t = u16;

/// An alias for `u32` using the C name from `<stdint.h>`. Use `u32`
/// instead.
pub type uint32_t = u32;

/// An alias for `u64` using the C name from `<stdint.h>`. Use `u64`
/// instead.
pub type uint64_t = u64;
}
pub mod posix88 {
Expand Down