Document when types have OS-dependent sizes

As per issue #43601, types that can change size depending on the
target operating system should say so in their documentation.

I used this template when adding doc comments:

 The size of a(n) <name> struct may vary depending on the target
 operating system, and may change between Rust releases.

For enums, I used "instance" instead of "struct".
This commit is contained in:
Phlosioneer
2018-03-11 07:41:13 -04:00
parent 1733a61141
commit 908328fca0
4 changed files with 33 additions and 0 deletions

View File

@@ -30,18 +30,27 @@ thread_local! {
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdio::stdin_raw` function.
///
/// The size of a StdinRaw struct may vary depending on the target operating
/// system, and may change between Rust releases.
struct StdinRaw(stdio::Stdin);
/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdio::stdout_raw` function.
///
/// The size of a StdoutRaw struct may vary depending on the target operating
/// system, and may change between Rust releases.
struct StdoutRaw(stdio::Stdout);
/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdio::stderr_raw` function.
///
/// The size of a StderrRaw struct may vary depending on the target operating
/// system, and may change between Rust releases.
struct StderrRaw(stdio::Stderr);
/// Constructs a new raw handle to the standard input of this process.