about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs2
-rw-r--r--src/libstd/io/buffered.rs20
-rw-r--r--src/libstd/path.rs6
-rw-r--r--src/libstd/process.rs4
-rw-r--r--src/libstd/thread/mod.rs8
5 files changed, 20 insertions, 20 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 746e18047f9..12241b3f881 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -203,7 +203,7 @@ const DISPLACEMENT_THRESHOLD: usize = 128;
 // so we round that up to 128.
 //
 // At a load factor of α, the odds of finding the target bucket after exactly n
-// unsuccesful probes[1] are
+// unsuccessful probes[1] are
 //
 // Pr_α{displacement = n} =
 // (1 - α) / α * ∑_{k≥1} e^(-kα) * (kα)^(k+n) / (k + n)! * (1 - kα / (k + n + 1))
diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs
index 1b832453523..d765dd227be 100644
--- a/src/libstd/io/buffered.rs
+++ b/src/libstd/io/buffered.rs
@@ -37,7 +37,7 @@ use memchr;
 /// use std::fs::File;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// let mut f = File::open("log.txt")?;
+/// let f = File::open("log.txt")?;
 /// let mut reader = BufReader::new(f);
 ///
 /// let mut line = String::new();
@@ -64,8 +64,8 @@ impl<R: Read> BufReader<R> {
     /// use std::fs::File;
     ///
     /// # fn foo() -> std::io::Result<()> {
-    /// let mut f = File::open("log.txt")?;
-    /// let mut reader = BufReader::new(f);
+    /// let f = File::open("log.txt")?;
+    /// let reader = BufReader::new(f);
     /// # Ok(())
     /// # }
     /// ```
@@ -85,8 +85,8 @@ impl<R: Read> BufReader<R> {
     /// use std::fs::File;
     ///
     /// # fn foo() -> std::io::Result<()> {
-    /// let mut f = File::open("log.txt")?;
-    /// let mut reader = BufReader::with_capacity(10, f);
+    /// let f = File::open("log.txt")?;
+    /// let reader = BufReader::with_capacity(10, f);
     /// # Ok(())
     /// # }
     /// ```
@@ -116,8 +116,8 @@ impl<R: Read> BufReader<R> {
     /// use std::fs::File;
     ///
     /// # fn foo() -> std::io::Result<()> {
-    /// let mut f1 = File::open("log.txt")?;
-    /// let mut reader = BufReader::new(f1);
+    /// let f1 = File::open("log.txt")?;
+    /// let reader = BufReader::new(f1);
     ///
     /// let f2 = reader.get_ref();
     /// # Ok(())
@@ -137,7 +137,7 @@ impl<R: Read> BufReader<R> {
     /// use std::fs::File;
     ///
     /// # fn foo() -> std::io::Result<()> {
-    /// let mut f1 = File::open("log.txt")?;
+    /// let f1 = File::open("log.txt")?;
     /// let mut reader = BufReader::new(f1);
     ///
     /// let f2 = reader.get_mut();
@@ -158,8 +158,8 @@ impl<R: Read> BufReader<R> {
     /// use std::fs::File;
     ///
     /// # fn foo() -> std::io::Result<()> {
-    /// let mut f1 = File::open("log.txt")?;
-    /// let mut reader = BufReader::new(f1);
+    /// let f1 = File::open("log.txt")?;
+    /// let reader = BufReader::new(f1);
     ///
     /// let f2 = reader.into_inner();
     /// # Ok(())
diff --git a/src/libstd/path.rs b/src/libstd/path.rs
index 432605cf3b2..619d0795421 100644
--- a/src/libstd/path.rs
+++ b/src/libstd/path.rs
@@ -476,7 +476,7 @@ impl<'a> Hash for PrefixComponent<'a> {
 
 /// A single component of a path.
 ///
-/// A `Component` roughtly corresponds to a substring between path separators
+/// A `Component` roughly corresponds to a substring between path separators
 /// (`/` or `\`).
 ///
 /// This `enum` is created by iterating over [`Components`], which in turn is
@@ -571,7 +571,7 @@ impl<'a> AsRef<OsStr> for Component<'a> {
     }
 }
 
-/// An interator over the [`Component`]s of a [`Path`].
+/// An iterator over the [`Component`]s of a [`Path`].
 ///
 /// This `struct` is created by the [`components`] method on [`Path`].
 /// See its documentation for more.
@@ -2019,7 +2019,7 @@ impl Path {
     /// * Repeated separators are ignored, so `a/b` and `a//b` both have
     ///   `a` and `b` as components.
     ///
-    /// * Occurences of `.` are normalized away, except if they are at the
+    /// * Occurrences of `.` are normalized away, except if they are at the
     ///   beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
     ///   `a/b` all have `a` and `b` as components, but `./a/b` starts with
     ///   an additional [`CurDir`] component.
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 7adfcc44ad0..31809e38239 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -799,8 +799,8 @@ impl From<fs::File> for Stdio {
 pub struct ExitStatus(imp::ExitStatus);
 
 impl ExitStatus {
-    /// Was termination successful? Signal termination not considered a success,
-    /// and success is defined as a zero exit status.
+    /// Was termination successful? Signal termination is not considered a
+    /// success, and success is defined as a zero exit status.
     ///
     /// # Examples
     ///
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 07a3a01ce86..c35676f2709 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -190,7 +190,7 @@ pub use self::local::{LocalKey, LocalKeyState, AccessError};
 /// - [`name`]: allows to give a name to the thread which is currently
 ///   only used in `panic` messages.
 /// - [`stack_size`]: specifies the desired stack size. Note that this can
-///   be overriden by the OS.
+///   be overridden by the OS.
 ///
 /// If the [`stack_size`] field is not specified, the stack size
 /// will be the `RUST_MIN_STACK` environment variable. If it is
@@ -529,7 +529,7 @@ pub fn current() -> Thread {
 /// Thus the pattern of `yield`ing after a failed poll is rather common when
 /// implementing low-level shared resources or synchronization primitives.
 ///
-/// However programmers will usualy prefer to use, [`channel`]s, [`Condvar`]s,
+/// However programmers will usually prefer to use, [`channel`]s, [`Condvar`]s,
 /// [`Mutex`]es or [`join`] for their synchronisation routines, as they avoid
 /// thinking about thread schedulling.
 ///
@@ -770,7 +770,7 @@ pub fn park_timeout_ms(ms: u32) {
 /// preemption or platform differences that may not cause the maximum
 /// amount of time waited to be precisely `dur` long.
 ///
-/// See the [park dococumentation][park] for more details.
+/// See the [park documentation][park] for more details.
 ///
 /// # Platform behavior
 ///
@@ -891,7 +891,7 @@ struct Inner {
 /// The [`thread::current`] function is available even for threads not spawned
 /// by the APIs of this module.
 ///
-/// There is usualy no need to create a `Thread` struct yourself, one
+/// There is usually no need to create a `Thread` struct yourself, one
 /// should instead use a function like `spawn` to create new threads, see the
 /// docs of [`Builder`] and [`spawn`] for more details.
 ///