fix various typos in doc comments

This commit is contained in:
Andy Russell
2018-11-12 13:05:20 -05:00
parent 0195812aea
commit 4e35cbb22e
49 changed files with 68 additions and 68 deletions

View File

@@ -85,7 +85,7 @@ pub use alloc_crate::alloc::*;
/// This is based on `malloc` on Unix platforms and `HeapAlloc` on Windows,
/// plus related functions.
///
/// This type implements the `GlobalAlloc` trait and Rust programs by deafult
/// This type implements the `GlobalAlloc` trait and Rust programs by default
/// work as if they had this definition:
///
/// ```rust

View File

@@ -1569,7 +1569,7 @@ impl<K, V, S> HashMap<K, V, S>
/// where the key should go, meaning the keys may become "lost" if their
/// location does not reflect their state. For instance, if you change a key
/// so that the map now contains keys which compare equal, search may start
/// acting eratically, with two keys randomly masking eachother. Implementations
/// acting erratically, with two keys randomly masking each other. Implementations
/// are free to assume this doesn't happen (within the limits of memory-safety).
#[unstable(feature = "hash_raw_entry", issue = "54043")]
pub fn raw_entry_mut(&mut self) -> RawEntryBuilderMut<K, V, S> {

View File

@@ -615,7 +615,7 @@ mod loop_keyword { }
//
/// The keyword used to define structs.
///
/// Structs in Rust come in three flavours: Structs with named fields, tuple structs, and unit
/// Structs in Rust come in three flavors: Structs with named fields, tuple structs, and unit
/// structs.
///
/// ```rust

View File

@@ -852,7 +852,7 @@ impl From<[u8; 4]> for IpAddr {
impl Ipv6Addr {
/// Creates a new IPv6 address from eight 16-bit segments.
///
/// The result will represent the IP address a:b:c:d:e:f:g:h.
/// The result will represent the IP address `a:b:c:d:e:f:g:h`.
///
/// # Examples
///

View File

@@ -1119,7 +1119,7 @@ impl From<fs::File> for Stdio {
/// let file = File::open("foo.txt").unwrap();
///
/// let reverse = Command::new("rev")
/// .stdin(file) // Implicit File convertion into a Stdio
/// .stdin(file) // Implicit File conversion into a Stdio
/// .output()
/// .expect("failed reverse command");
///
@@ -1337,7 +1337,7 @@ impl Child {
/// Attempts to collect the exit status of the child if it has already
/// exited.
///
/// This function will not block the calling thread and will only advisorily
/// This function will not block the calling thread and will only
/// check to see if the child process has exited or not. If the child has
/// exited then on Unix the process id is reaped. This function is
/// guaranteed to repeatedly return a successful exit status so long as the

View File

@@ -26,7 +26,7 @@ impl FileDesc {
pub fn raw(&self) -> usize { self.fd }
/// Extracts the actual filedescriptor without closing it.
/// Extracts the actual file descriptor without closing it.
pub fn into_raw(self) -> usize {
let fd = self.fd;
mem::forget(self);

View File

@@ -45,7 +45,7 @@ pub unsafe fn brk(addr: usize) -> Result<usize> {
/// # Errors
///
/// * `EACCES` - permission is denied for one of the components of `path`, or `path`
/// * `EFAULT` - `path` does not point to the process's addressible memory
/// * `EFAULT` - `path` does not point to the process's addressable memory
/// * `EIO` - an I/O error occurred
/// * `ENOENT` - `path` does not exit
/// * `ENOTDIR` - `path` is not a directory
@@ -347,7 +347,7 @@ pub fn waitpid(pid: usize, status: &mut usize, options: usize) -> Result<usize>
///
/// * `EAGAIN` - the file descriptor was opened with `O_NONBLOCK` and writing would block
/// * `EBADF` - the file descriptor is not valid or is not open for writing
/// * `EFAULT` - `buf` does not point to the process's addressible memory
/// * `EFAULT` - `buf` does not point to the process's addressable memory
/// * `EIO` - an I/O error occurred
/// * `ENOSPC` - the device containing the file descriptor has no room for data
/// * `EPIPE` - the file descriptor refers to a pipe or socket whose reading end is closed

View File

@@ -46,7 +46,7 @@ impl FileDesc {
pub fn raw(&self) -> c_int { self.fd }
/// Extracts the actual filedescriptor without closing it.
/// Extracts the actual file descriptor without closing it.
pub fn into_raw(self) -> c_int {
let fd = self.fd;
mem::forget(self);

View File

@@ -233,7 +233,7 @@ pub use self::local::{LocalKey, AccessError};
///
/// You may want to use [`spawn`] instead of [`thread::spawn`], when you want
/// to recover from a failure to launch a thread, indeed the free function will
/// panick where the `Builder` method will return a [`io::Result`].
/// panic where the `Builder` method will return a [`io::Result`].
///
/// # Examples
///