about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/doc/book/error-handling.md2
-rw-r--r--src/libbacktrace/ansidecl.h2
-rw-r--r--src/libcollections/btree/node.rs2
-rw-r--r--src/libcollections/str.rs2
-rw-r--r--src/libcollections/string.rs2
-rw-r--r--src/libcore/convert.rs2
-rw-r--r--src/libcore/str/mod.rs2
-rw-r--r--src/librbml/lib.rs2
-rw-r--r--src/librustc/middle/pat_util.rs4
-rw-r--r--src/librustc/middle/ty/mod.rs2
-rw-r--r--src/librustc/mir/visit.rs2
-rw-r--r--src/librustc_trans/trans/common.rs2
-rw-r--r--src/librustc_typeck/check/mod.rs2
-rw-r--r--src/libstd/fs.rs2
-rw-r--r--src/libstd/memchr.rs2
-rw-r--r--src/libstd/panic.rs2
-rw-r--r--src/test/compile-fail/issue-30438-c.rs2
-rw-r--r--src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs2
-rw-r--r--src/test/run-pass/mir_trans_calls.rs2
19 files changed, 20 insertions, 20 deletions
diff --git a/src/doc/book/error-handling.md b/src/doc/book/error-handling.md
index affea7926a2..11086af10bd 100644
--- a/src/doc/book/error-handling.md
+++ b/src/doc/book/error-handling.md
@@ -265,7 +265,7 @@ fn map<F, T, A>(option: Option<T>, f: F) -> Option<A> where F: FnOnce(T) -> A {
 ```
 
 Indeed, `map` is [defined as a method][2] on `Option<T>` in the standard library.
-As a method, it has a slighly different signature: methods take `self`, `&self`,
+As a method, it has a slightly different signature: methods take `self`, `&self`,
 or `&mut self` as their first argument.
 
 Armed with our new combinator, we can rewrite our `extension_explicit` method
diff --git a/src/libbacktrace/ansidecl.h b/src/libbacktrace/ansidecl.h
index 6e4bfc21f25..4087dd72917 100644
--- a/src/libbacktrace/ansidecl.h
+++ b/src/libbacktrace/ansidecl.h
@@ -1,4 +1,4 @@
-/* ANSI and traditional C compatability macros
+/* ANSI and traditional C compatibility macros
    Copyright (C) 1991-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
diff --git a/src/libcollections/btree/node.rs b/src/libcollections/btree/node.rs
index f07962811fd..8ae23a646e4 100644
--- a/src/libcollections/btree/node.rs
+++ b/src/libcollections/btree/node.rs
@@ -28,7 +28,7 @@
 // }
 // ```
 //
-// Since Rust doesn't acutally have dependent types and polymorphic recursion,
+// Since Rust doesn't actually have dependent types and polymorphic recursion,
 // we make do with lots of unsafety.
 
 use alloc::heap;
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs
index 20a7c651350..89b5e5b3075 100644
--- a/src/libcollections/str.rs
+++ b/src/libcollections/str.rs
@@ -1808,7 +1808,7 @@ impl str {
                 // Σ maps to σ, except at the end of a word where it maps to ς.
                 // This is the only conditional (contextual) but language-independent mapping
                 // in `SpecialCasing.txt`,
-                // so hard-code it rather than have a generic "condition" mechanim.
+                // so hard-code it rather than have a generic "condition" mechanism.
                 // See https://github.com/rust-lang/rust/issues/26035
                 map_uppercase_sigma(self, i, &mut s)
             } else {
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs
index 7f6def68320..7137fdde97e 100644
--- a/src/libcollections/string.rs
+++ b/src/libcollections/string.rs
@@ -193,7 +193,7 @@ use boxed::Box;
 /// mem::forget(story);
 ///
 /// // We can re-build a String out of ptr, len, and capacity. This is all
-/// // unsafe becuase we are responsible for making sure the components are
+/// // unsafe because we are responsible for making sure the components are
 /// // valid:
 /// let s = unsafe { String::from_raw_parts(ptr as *mut _, len, capacity) } ;
 ///
diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs
index c207ad16595..b4ac020795c 100644
--- a/src/libcore/convert.rs
+++ b/src/libcore/convert.rs
@@ -19,7 +19,7 @@
 //!
 //! - Impl the `As*` traits for reference-to-reference conversions
 //! - Impl the `Into` trait when you want to consume the value in the conversion
-//! - The `From` trait is the most flexible, usefull for values _and_ references conversions
+//! - The `From` trait is the most flexible, useful for values _and_ references conversions
 //!
 //! As a library writer, you should prefer implementing `From<T>` rather than
 //! `Into<U>`, as `From` provides greater flexibility and offer the equivalent `Into`
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs
index f19970546d7..fa169416a10 100644
--- a/src/libcore/str/mod.rs
+++ b/src/libcore/str/mod.rs
@@ -1740,7 +1740,7 @@ impl StrExt for str {
         let mut matcher = pat.into_searcher(self);
         if let Some((a, b)) = matcher.next_reject() {
             i = a;
-            j = b; // Rember earliest known match, correct it below if
+            j = b; // Remember earliest known match, correct it below if
                    // last match is different
         }
         if let Some((_, b)) = matcher.next_reject_back() {
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs
index 8404026df14..1727fa2a0d3 100644
--- a/src/librbml/lib.rs
+++ b/src/librbml/lib.rs
@@ -107,7 +107,7 @@
 //!
 //! - `Opaque` (`17`): An opaque, custom-format tag.
 //!   Used to wrap ordinary custom tags or data in the auto-serialized context.
-//!   Rustc typically uses this to encode type informations.
+//!   Rustc typically uses this to encode type information.
 //!
 //! First 0x20 tags are reserved by RBML; custom tags start at 0x20.
 
diff --git a/src/librustc/middle/pat_util.rs b/src/librustc/middle/pat_util.rs
index 41367b9361f..8181e7d798c 100644
--- a/src/librustc/middle/pat_util.rs
+++ b/src/librustc/middle/pat_util.rs
@@ -153,7 +153,7 @@ pub fn pat_contains_bindings(dm: &DefMap, pat: &hir::Pat) -> bool {
 }
 
 /// Checks if the pattern contains any `ref` or `ref mut` bindings,
-/// and if yes wether its containing mutable ones or just immutables ones.
+/// and if yes whether its containing mutable ones or just immutables ones.
 pub fn pat_contains_ref_binding(dm: &RefCell<DefMap>, pat: &hir::Pat) -> Option<hir::Mutability> {
     let mut result = None;
     pat_bindings(dm, pat, |mode, _, _, _| {
@@ -172,7 +172,7 @@ pub fn pat_contains_ref_binding(dm: &RefCell<DefMap>, pat: &hir::Pat) -> Option<
 }
 
 /// Checks if the patterns for this arm contain any `ref` or `ref mut`
-/// bindings, and if yes wether its containing mutable ones or just immutables ones.
+/// bindings, and if yes whether its containing mutable ones or just immutables ones.
 pub fn arm_contains_ref_binding(dm: &RefCell<DefMap>, arm: &hir::Arm) -> Option<hir::Mutability> {
     arm.pats.iter()
             .filter_map(|pat| pat_contains_ref_binding(dm, pat))
diff --git a/src/librustc/middle/ty/mod.rs b/src/librustc/middle/ty/mod.rs
index 3a57474c303..e3357aabd5d 100644
--- a/src/librustc/middle/ty/mod.rs
+++ b/src/librustc/middle/ty/mod.rs
@@ -2236,7 +2236,7 @@ impl<'tcx> ctxt<'tcx> {
     /// Given the did of an ADT, return a reference to its definition.
     pub fn lookup_adt_def(&self, did: DefId) -> AdtDef<'tcx> {
         // when reverse-variance goes away, a transmute::<AdtDefMaster,AdtDef>
-        // woud be needed here.
+        // would be needed here.
         self.lookup_adt_def_master(did)
     }
 
diff --git a/src/librustc/mir/visit.rs b/src/librustc/mir/visit.rs
index fb4e0e97054..5e3c6e028a3 100644
--- a/src/librustc/mir/visit.rs
+++ b/src/librustc/mir/visit.rs
@@ -92,7 +92,7 @@ macro_rules! make_mir_visitor {
             }
 
             // The `super_xxx` methods comprise the default behavior and are
-            // not meant to be overidden.
+            // not meant to be overridden.
 
             fn super_mir(&mut self,
                          mir: & $($mutability)* Mir<'tcx>) {
diff --git a/src/librustc_trans/trans/common.rs b/src/librustc_trans/trans/common.rs
index ec33046e5d9..1269c266c7c 100644
--- a/src/librustc_trans/trans/common.rs
+++ b/src/librustc_trans/trans/common.rs
@@ -541,7 +541,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
     }
 
     // Returns a ValueRef of the "eh_unwind_resume" lang item if one is defined,
-    // otherwise declares it as an external funtion.
+    // otherwise declares it as an external function.
     pub fn eh_unwind_resume(&self) -> ValueRef {
         use trans::attributes;
         assert!(self.ccx.sess().target.target.options.custom_unwind_resume);
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
index 9a0d6bc1641..a476f9e1a80 100644
--- a/src/librustc_typeck/check/mod.rs
+++ b/src/librustc_typeck/check/mod.rs
@@ -1809,7 +1809,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
             debug!("select_all_obligations_and_apply_defaults: defaults={:?}", default_map);
 
             // We loop over the unsolved variables, resolving them and if they are
-            // and unconstrainted numberic type we add them to the set of unbound
+            // and unconstrainted numeric type we add them to the set of unbound
             // variables. We do this so we only apply literal fallback to type
             // variables without defaults.
             for ty in &unsolved_variables {
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs
index 2087148d844..d42b9489180 100644
--- a/src/libstd/fs.rs
+++ b/src/libstd/fs.rs
@@ -521,7 +521,7 @@ impl OpenOptions {
     /// No file is allowed to exist at the target location, also no (dangling)
     /// symlink.
     ///
-    /// This option is usefull because it as atomic. Otherwise between checking
+    /// This option is useful because it as atomic. Otherwise between checking
     /// whether a file exists and creating a new one, the file may have been
     /// created by another process (a TOCTOU race condition / attack).
     ///
diff --git a/src/libstd/memchr.rs b/src/libstd/memchr.rs
index 27702e2e59a..1d97611eabb 100644
--- a/src/libstd/memchr.rs
+++ b/src/libstd/memchr.rs
@@ -150,7 +150,7 @@ mod fallback {
         // Scan for a single byte value by reading two `usize` words at a time.
         //
         // Split `text` in three parts
-        // - unaligned inital part, before the first word aligned address in text
+        // - unaligned initial part, before the first word aligned address in text
         // - body, scan by 2 words at a time
         // - the last remaining part, < 2 word size
         let len = text.len();
diff --git a/src/libstd/panic.rs b/src/libstd/panic.rs
index 3677bd27b16..83df54f1830 100644
--- a/src/libstd/panic.rs
+++ b/src/libstd/panic.rs
@@ -84,7 +84,7 @@ pub use panicking::{take_handler, set_handler, PanicInfo, Location};
 /// recover safe. The general idea is that any mutable state which can be shared
 /// across `recover` is not recover safe by default. This is because it is very
 /// easy to witness a broken invariant outside of `recover` as the data is
-/// simply accesed as usual.
+/// simply accessed as usual.
 ///
 /// Types like `&Mutex<T>`, however, are recover safe because they implement
 /// poisoning by default. They still allow witnessing a broken invariant, but
diff --git a/src/test/compile-fail/issue-30438-c.rs b/src/test/compile-fail/issue-30438-c.rs
index 06d391af559..2b4d0dc339b 100644
--- a/src/test/compile-fail/issue-30438-c.rs
+++ b/src/test/compile-fail/issue-30438-c.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// Simplfied regression test for #30438, inspired by arielb1.
+// Simplified regression test for #30438, inspired by arielb1.
 
 trait Trait { type Out; }
 
diff --git a/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs b/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs
index 1362f8ac0ae..ec8db996600 100644
--- a/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs
+++ b/src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // OIBIT-based version of #29859, supertrait version. Test that using
-// a simple OIBIT `..` impl alone still doesn't allow arbitary bounds
+// a simple OIBIT `..` impl alone still doesn't allow arbitrary bounds
 // to be synthesized.
 
 #![feature(optin_builtin_traits)]
diff --git a/src/test/run-pass/mir_trans_calls.rs b/src/test/run-pass/mir_trans_calls.rs
index 8fdedb6581f..fc45fbf7278 100644
--- a/src/test/run-pass/mir_trans_calls.rs
+++ b/src/test/run-pass/mir_trans_calls.rs
@@ -113,7 +113,7 @@ fn test_fn_object(f: &Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
 fn test_fn_impl(f: &&Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
     // This call goes through the Fn implementation for &Fn provided in
     // core::ops::impls. It expands to a static Fn::call() that calls the
-    // Fn::call() implemenation of the object shim underneath.
+    // Fn::call() implementation of the object shim underneath.
     f(x, y)
 }