diff options
| author | Clar Charr <clar@charr.xyz> | 2017-12-23 17:29:51 -0500 |
|---|---|---|
| committer | Clar Charr <clar@charr.xyz> | 2018-01-29 17:44:12 -0500 |
| commit | 853fa5873c91ad1d01e69e7cbdb758001a31e9c1 (patch) | |
| tree | cb07a7f88daa75dc202f51dd9fbd18ebecb1639b /src/libstd/os | |
| parent | 1a043533f504145fa51beeb6c94765e6865031ee (diff) | |
| download | rust-853fa5873c91ad1d01e69e7cbdb758001a31e9c1.tar.gz rust-853fa5873c91ad1d01e69e7cbdb758001a31e9c1.zip | |
Revisions suggested in comments
Diffstat (limited to 'src/libstd/os')
| -rw-r--r-- | src/libstd/os/raw/char.md | 2 | ||||
| -rw-r--r-- | src/libstd/os/raw/long.md | 3 | ||||
| -rw-r--r-- | src/libstd/os/raw/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/os/raw/ulong.md | 3 |
4 files changed, 4 insertions, 6 deletions
diff --git a/src/libstd/os/raw/char.md b/src/libstd/os/raw/char.md index fb47dff187e..6816e519d1a 100644 --- a/src/libstd/os/raw/char.md +++ b/src/libstd/os/raw/char.md @@ -2,7 +2,7 @@ Equivalent to C's `char` type. [C's `char` type] is completely unlike [Rust's `char` type]; while Rust's type represents a unicode scalar value, C's `char` type is just an ordinary integer. In practice, this type will always be either [`i8`] or [`u8`], but you're technically not supposed to rely on this behaviour, as the standard only defines a char as being at least eight bits long. -C chars are most commonly used to make C strings. Unlike Rust, where the length of a string is included alongside the string, C strings mark the end of a string with a zero. See [`CStr`] for more information. +C chars are most commonly used to make C strings. Unlike Rust, where the length of a string is included alongside the string, C strings mark the end of a string with the character `'\0'`. See [`CStr`] for more information. [C's `char` type]: https://en.wikipedia.org/wiki/C_data_types#Basic_types [Rust's `char` type]: ../../primitive.char.html diff --git a/src/libstd/os/raw/long.md b/src/libstd/os/raw/long.md index c281e017336..5a2e2331c0a 100644 --- a/src/libstd/os/raw/long.md +++ b/src/libstd/os/raw/long.md @@ -1,8 +1,7 @@ Equivalent to C's `signed long` (`long`) type. -This type will usually be [`i64`], but is sometimes [`i32`] \(i.e. [`isize`]\) on 32-bit systems. Technically, the standard only requires that it be at least 32 bits, or at least the size of an [`int`]. +This type will usually be [`i64`], but is sometimes [`i32`]. Technically, the standard only requires that it be at least 32 bits, or at least the size of an [`int`]. [`int`]: type.c_int.html [`i32`]: ../../primitive.i32.html [`i64`]: ../../primitive.i64.html -[`isize`]: ../../primitive.isize.html diff --git a/src/libstd/os/raw/mod.rs b/src/libstd/os/raw/mod.rs index e96ba045ce7..710976ed8e0 100644 --- a/src/libstd/os/raw/mod.rs +++ b/src/libstd/os/raw/mod.rs @@ -83,7 +83,7 @@ use fmt; /// and `*mut c_void` is equivalent to C's `void*`. That said, this is /// *not* the same as C's `void` return type, which is Rust's `()` type. /// -/// [pointer]: ../primitive.pointer.html +/// [pointer]: ../../primitive.pointer.html // NB: For LLVM to recognize the void pointer type and by extension // functions like malloc(), we need to have it represented as i8* in // LLVM bitcode. The enum used here ensures this and prevents misuse diff --git a/src/libstd/os/raw/ulong.md b/src/libstd/os/raw/ulong.md index 3cdbc6f59bf..919de171a39 100644 --- a/src/libstd/os/raw/ulong.md +++ b/src/libstd/os/raw/ulong.md @@ -1,8 +1,7 @@ Equivalent to C's `unsigned long` type. -This type will usually be [`u64`], but is sometimes [`u32`] \(i.e. [`usize`]\) on 32-bit systems. Technically, the standard only requires that it be the same size as a [`long`], which isn't very clear-cut. +This type will usually be [`u64`], but is sometimes [`u32`]. Technically, the standard only requires that it be the same size as a [`long`], which isn't very clear-cut. [`long`]: type.c_long.html [`u32`]: ../../primitive.u32.html [`u64`]: ../../primitive.u64.html -[`usize`]: ../../primitive.usize.html |
