diff options
| author | Bastien Orivel <eijebong@bananium.fr> | 2017-08-11 20:34:14 +0200 |
|---|---|---|
| committer | Bastien Orivel <eijebong@bananium.fr> | 2017-08-12 14:01:11 +0200 |
| commit | 3ab86fbab281ca059731c31fa2aee5d9afc7e6dc (patch) | |
| tree | 27758d734abda3918162b48a379a9dbf556a4a84 /src/libstd | |
| parent | 59f6b8338e866b022941ff78ccc82ccef73a52fd (diff) | |
| download | rust-3ab86fbab281ca059731c31fa2aee5d9afc7e6dc.tar.gz rust-3ab86fbab281ca059731c31fa2aee5d9afc7e6dc.zip | |
Fix some typos
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/net/tcp.rs | 2 | ||||
| -rw-r--r-- | src/libstd/net/udp.rs | 2 | ||||
| -rw-r--r-- | src/libstd/panic.rs | 2 | ||||
| -rw-r--r-- | src/libstd/panicking.rs | 25 | ||||
| -rw-r--r-- | src/libstd/primitive_docs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/redox/ext/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/redox/ext/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/fs.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/net.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/ext/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/windows/ext/fs.rs | 2 |
12 files changed, 25 insertions, 24 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 062186ef708..1e692abaff2 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -657,7 +657,7 @@ impl OpenOptions { /// This function will return an error under a number of different /// circumstances. Some of these error conditions are listed here, together /// with their [`ErrorKind`]. The mapping to [`ErrorKind`]s is not part of - /// the compatiblity contract of the function, especially the `Other` kind + /// the compatibility contract of the function, especially the `Other` kind /// might change to more specific kinds in the future. /// /// * [`NotFound`]: The specified file does not exist and neither `create` diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index fdeca8bc5ca..20fd50ff630 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -351,7 +351,7 @@ impl TcpStream { self.0.write_timeout() } - /// Receives data on the socket from the remote adress to which it is + /// Receives data on the socket from the remote address to which it is /// connected, without removing that data from the queue. On success, /// returns the number of bytes peeked. /// diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index 80151dc2b44..9aff9897885 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -622,7 +622,7 @@ impl UdpSocket { self.0.recv(buf) } - /// Receives data on the socket from the remote adress to which it is + /// Receives data on the socket from the remote address to which it is /// connected, without removing that data from the queue. On success, /// returns the number of bytes peeked. /// diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs index 10b3209257e..97b09b7e2ad 100644 --- a/src/libstd/panic.rs +++ b/src/libstd/panic.rs @@ -37,7 +37,7 @@ pub use panicking::{take_hook, set_hook, PanicInfo, Location}; /// In Rust a function can "return" early if it either panics or calls a /// function which transitively panics. This sort of control flow is not always /// anticipated, and has the possibility of causing subtle bugs through a -/// combination of two criticial components: +/// combination of two critical components: /// /// 1. A data structure is in a temporarily invalid state when the thread /// panics. diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 04e1a579dec..99567bd08bb 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -171,7 +171,7 @@ pub fn take_hook() -> Box<Fn(&PanicInfo) + 'static + Sync + Send> { /// use std::panic; /// /// panic::set_hook(Box::new(|panic_info| { -/// println!("panic occured: {:?}", panic_info.payload().downcast_ref::<&str>().unwrap()); +/// println!("panic occurred: {:?}", panic_info.payload().downcast_ref::<&str>().unwrap()); /// })); /// /// panic!("Normal panic"); @@ -196,7 +196,7 @@ impl<'a> PanicInfo<'a> { /// use std::panic; /// /// panic::set_hook(Box::new(|panic_info| { - /// println!("panic occured: {:?}", panic_info.payload().downcast_ref::<&str>().unwrap()); + /// println!("panic occurred: {:?}", panic_info.payload().downcast_ref::<&str>().unwrap()); /// })); /// /// panic!("Normal panic"); @@ -221,9 +221,10 @@ impl<'a> PanicInfo<'a> { /// /// panic::set_hook(Box::new(|panic_info| { /// if let Some(location) = panic_info.location() { - /// println!("panic occured in file '{}' at line {}", location.file(), location.line()); + /// println!("panic occurred in file '{}' at line {}", location.file(), + /// location.line()); /// } else { - /// println!("panic occured but can't get location information..."); + /// println!("panic occurred but can't get location information..."); /// } /// })); /// @@ -249,9 +250,9 @@ impl<'a> PanicInfo<'a> { /// /// panic::set_hook(Box::new(|panic_info| { /// if let Some(location) = panic_info.location() { -/// println!("panic occured in file '{}' at line {}", location.file(), location.line()); +/// println!("panic occurred in file '{}' at line {}", location.file(), location.line()); /// } else { -/// println!("panic occured but can't get location information..."); +/// println!("panic occurred but can't get location information..."); /// } /// })); /// @@ -275,9 +276,9 @@ impl<'a> Location<'a> { /// /// panic::set_hook(Box::new(|panic_info| { /// if let Some(location) = panic_info.location() { - /// println!("panic occured in file '{}'", location.file()); + /// println!("panic occurred in file '{}'", location.file()); /// } else { - /// println!("panic occured but can't get location information..."); + /// println!("panic occurred but can't get location information..."); /// } /// })); /// @@ -297,9 +298,9 @@ impl<'a> Location<'a> { /// /// panic::set_hook(Box::new(|panic_info| { /// if let Some(location) = panic_info.location() { - /// println!("panic occured at line {}", location.line()); + /// println!("panic occurred at line {}", location.line()); /// } else { - /// println!("panic occured but can't get location information..."); + /// println!("panic occurred but can't get location information..."); /// } /// })); /// @@ -320,9 +321,9 @@ impl<'a> Location<'a> { /// /// panic::set_hook(Box::new(|panic_info| { /// if let Some(location) = panic_info.location() { - /// println!("panic occured at column {}", location.column()); + /// println!("panic occurred at column {}", location.column()); /// } else { - /// println!("panic occured but can't get location information..."); + /// println!("panic occurred but can't get location information..."); /// } /// })); /// diff --git a/src/libstd/primitive_docs.rs b/src/libstd/primitive_docs.rs index 7be319d1954..c52899db437 100644 --- a/src/libstd/primitive_docs.rs +++ b/src/libstd/primitive_docs.rs @@ -906,7 +906,7 @@ mod prim_ref { } /// These markers can be combined, so `unsafe extern "stdcall" fn()` is a valid type. /// /// Like references in rust, function pointers are assumed to not be null, so if you want to pass a -/// function pointer over FFI and be able to accomodate null pointers, make your type +/// function pointer over FFI and be able to accommodate null pointers, make your type /// `Option<fn()>` with your required signature. /// /// Function pointers implement the following traits: diff --git a/src/libstd/sys/redox/ext/fs.rs b/src/libstd/sys/redox/ext/fs.rs index 9a0d1e06da3..5d4edc2cf92 100644 --- a/src/libstd/sys/redox/ext/fs.rs +++ b/src/libstd/sys/redox/ext/fs.rs @@ -121,7 +121,7 @@ pub trait OpenOptionsExt { #[stable(feature = "fs_ext", since = "1.1.0")] fn mode(&mut self, mode: u32) -> &mut Self; - /// Pass custom flags to the `flags` agument of `open`. + /// Pass custom flags to the `flags` argument of `open`. /// /// The bits that define the access mode are masked out with `O_ACCMODE`, to /// ensure they do not interfere with the access mode set by Rusts options. diff --git a/src/libstd/sys/redox/ext/process.rs b/src/libstd/sys/redox/ext/process.rs index c59524974bf..e68e180acf1 100644 --- a/src/libstd/sys/redox/ext/process.rs +++ b/src/libstd/sys/redox/ext/process.rs @@ -47,7 +47,7 @@ pub trait CommandExt { /// # Notes /// /// This closure will be run in the context of the child process after a - /// `fork`. This primarily means that any modificatons made to memory on + /// `fork`. This primarily means that any modifications made to memory on /// behalf of this closure will **not** be visible to the parent process. /// This is often a very constrained environment where normal operations /// like `malloc` or acquiring a mutex are not guaranteed to work (due to diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index 26710bf61d5..a94585723a1 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -46,7 +46,7 @@ pub trait FileExt { /// /// The current file cursor is not affected by this function. /// - /// When writing beyond the end of the file, the file is appropiately + /// When writing beyond the end of the file, the file is appropriately /// extended and the intermediate bytes are initialized with the value 0. /// /// Note that similar to `File::write`, it is not an error to return a @@ -168,7 +168,7 @@ pub trait OpenOptionsExt { #[stable(feature = "fs_ext", since = "1.1.0")] fn mode(&mut self, mode: u32) -> &mut Self; - /// Pass custom flags to the `flags` agument of `open`. + /// Pass custom flags to the `flags` argument of `open`. /// /// The bits that define the access mode are masked out with `O_ACCMODE`, to /// ensure they do not interfere with the access mode set by Rusts options. diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs index 7701ae25b41..d9ab07fe509 100644 --- a/src/libstd/sys/unix/ext/net.rs +++ b/src/libstd/sys/unix/ext/net.rs @@ -327,7 +327,7 @@ impl UnixStream { /// /// The returned `UnixStream` is a reference to the same stream that this /// object references. Both handles will read and write the same stream of - /// data, and options set on one stream will be propogated to the other + /// data, and options set on one stream will be propagated to the other /// stream. /// /// # Examples diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 2961c4ec582..cde21b089a2 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -47,7 +47,7 @@ pub trait CommandExt { /// # Notes /// /// This closure will be run in the context of the child process after a - /// `fork`. This primarily means that any modificatons made to memory on + /// `fork`. This primarily means that any modifications made to memory on /// behalf of this closure will **not** be visible to the parent process. /// This is often a very constrained environment where normal operations /// like `malloc` or acquiring a mutex are not guaranteed to work (due to diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs index a1c63e33588..d58a3505154 100644 --- a/src/libstd/sys/windows/ext/fs.rs +++ b/src/libstd/sys/windows/ext/fs.rs @@ -66,7 +66,7 @@ pub trait FileExt { /// from the current cursor. The current cursor **is** affected by this /// function, it is set to the end of the write. /// - /// When writing beyond the end of the file, the file is appropiately + /// When writing beyond the end of the file, the file is appropriately /// extended and the intermediate bytes are left uninitialized. /// /// Note that similar to `File::write`, it is not an error to return a |
