Skip to content

Commit 02aa0af

Browse files
committedFeb 9, 2016
Minor spelling fixes
1 parent 6630a08 commit 02aa0af

File tree

19 files changed

+20
-20
lines changed

19 files changed

+20
-20
lines changed
 

‎src/doc/book/error-handling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ fn map<F, T, A>(option: Option<T>, f: F) -> Option<A> where F: FnOnce(T) -> A {
265265
```
266266

267267
Indeed, `map` is [defined as a method][2] on `Option<T>` in the standard library.
268-
As a method, it has a slighly different signature: methods take `self`, `&self`,
268+
As a method, it has a slightly different signature: methods take `self`, `&self`,
269269
or `&mut self` as their first argument.
270270

271271
Armed with our new combinator, we can rewrite our `extension_explicit` method

‎src/libbacktrace/ansidecl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* ANSI and traditional C compatability macros
1+
/* ANSI and traditional C compatibility macros
22
Copyright (C) 1991-2015 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44

‎src/libcollections/btree/node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
// }
2929
// ```
3030
//
31-
// Since Rust doesn't acutally have dependent types and polymorphic recursion,
31+
// Since Rust doesn't actually have dependent types and polymorphic recursion,
3232
// we make do with lots of unsafety.
3333

3434
use alloc::heap;

‎src/libcollections/str.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ impl str {
18081808
// Σ maps to σ, except at the end of a word where it maps to ς.
18091809
// This is the only conditional (contextual) but language-independent mapping
18101810
// in `SpecialCasing.txt`,
1811-
// so hard-code it rather than have a generic "condition" mechanim.
1811+
// so hard-code it rather than have a generic "condition" mechanism.
18121812
// See https://github.com/rust-lang/rust/issues/26035
18131813
map_uppercase_sigma(self, i, &mut s)
18141814
} else {

‎src/libcollections/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ use boxed::Box;
193193
/// mem::forget(story);
194194
///
195195
/// // We can re-build a String out of ptr, len, and capacity. This is all
196-
/// // unsafe becuase we are responsible for making sure the components are
196+
/// // unsafe because we are responsible for making sure the components are
197197
/// // valid:
198198
/// let s = unsafe { String::from_raw_parts(ptr as *mut _, len, capacity) } ;
199199
///

‎src/libcore/convert.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//!
2020
//! - Impl the `As*` traits for reference-to-reference conversions
2121
//! - Impl the `Into` trait when you want to consume the value in the conversion
22-
//! - The `From` trait is the most flexible, usefull for values _and_ references conversions
22+
//! - The `From` trait is the most flexible, useful for values _and_ references conversions
2323
//!
2424
//! As a library writer, you should prefer implementing `From<T>` rather than
2525
//! `Into<U>`, as `From` provides greater flexibility and offer the equivalent `Into`

‎src/libcore/str/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ impl StrExt for str {
17401740
let mut matcher = pat.into_searcher(self);
17411741
if let Some((a, b)) = matcher.next_reject() {
17421742
i = a;
1743-
j = b; // Rember earliest known match, correct it below if
1743+
j = b; // Remember earliest known match, correct it below if
17441744
// last match is different
17451745
}
17461746
if let Some((_, b)) = matcher.next_reject_back() {

‎src/librbml/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
//!
108108
//! - `Opaque` (`17`): An opaque, custom-format tag.
109109
//! Used to wrap ordinary custom tags or data in the auto-serialized context.
110-
//! Rustc typically uses this to encode type informations.
110+
//! Rustc typically uses this to encode type information.
111111
//!
112112
//! First 0x20 tags are reserved by RBML; custom tags start at 0x20.
113113

‎src/librustc/middle/pat_util.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ pub fn pat_contains_bindings(dm: &DefMap, pat: &hir::Pat) -> bool {
153153
}
154154

155155
/// Checks if the pattern contains any `ref` or `ref mut` bindings,
156-
/// and if yes wether its containing mutable ones or just immutables ones.
156+
/// and if yes whether its containing mutable ones or just immutables ones.
157157
pub fn pat_contains_ref_binding(dm: &RefCell<DefMap>, pat: &hir::Pat) -> Option<hir::Mutability> {
158158
let mut result = None;
159159
pat_bindings(dm, pat, |mode, _, _, _| {
@@ -172,7 +172,7 @@ pub fn pat_contains_ref_binding(dm: &RefCell<DefMap>, pat: &hir::Pat) -> Option<
172172
}
173173

174174
/// Checks if the patterns for this arm contain any `ref` or `ref mut`
175-
/// bindings, and if yes wether its containing mutable ones or just immutables ones.
175+
/// bindings, and if yes whether its containing mutable ones or just immutables ones.
176176
pub fn arm_contains_ref_binding(dm: &RefCell<DefMap>, arm: &hir::Arm) -> Option<hir::Mutability> {
177177
arm.pats.iter()
178178
.filter_map(|pat| pat_contains_ref_binding(dm, pat))

‎src/librustc/middle/ty/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,7 @@ impl<'tcx> ctxt<'tcx> {
22362236
/// Given the did of an ADT, return a reference to its definition.
22372237
pub fn lookup_adt_def(&self, did: DefId) -> AdtDef<'tcx> {
22382238
// when reverse-variance goes away, a transmute::<AdtDefMaster,AdtDef>
2239-
// woud be needed here.
2239+
// would be needed here.
22402240
self.lookup_adt_def_master(did)
22412241
}
22422242

‎src/librustc/mir/visit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ macro_rules! make_mir_visitor {
9292
}
9393

9494
// The `super_xxx` methods comprise the default behavior and are
95-
// not meant to be overidden.
95+
// not meant to be overridden.
9696

9797
fn super_mir(&mut self,
9898
mir: & $($mutability)* Mir<'tcx>) {

‎src/librustc_trans/trans/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl<'a, 'tcx> FunctionContext<'a, 'tcx> {
541541
}
542542

543543
// Returns a ValueRef of the "eh_unwind_resume" lang item if one is defined,
544-
// otherwise declares it as an external funtion.
544+
// otherwise declares it as an external function.
545545
pub fn eh_unwind_resume(&self) -> ValueRef {
546546
use trans::attributes;
547547
assert!(self.ccx.sess().target.target.options.custom_unwind_resume);

‎src/librustc_typeck/check/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
18091809
debug!("select_all_obligations_and_apply_defaults: defaults={:?}", default_map);
18101810

18111811
// We loop over the unsolved variables, resolving them and if they are
1812-
// and unconstrainted numberic type we add them to the set of unbound
1812+
// and unconstrainted numeric type we add them to the set of unbound
18131813
// variables. We do this so we only apply literal fallback to type
18141814
// variables without defaults.
18151815
for ty in &unsolved_variables {

‎src/libstd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ impl OpenOptions {
521521
/// No file is allowed to exist at the target location, also no (dangling)
522522
/// symlink.
523523
///
524-
/// This option is usefull because it as atomic. Otherwise between checking
524+
/// This option is useful because it as atomic. Otherwise between checking
525525
/// whether a file exists and creating a new one, the file may have been
526526
/// created by another process (a TOCTOU race condition / attack).
527527
///

‎src/libstd/memchr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ mod fallback {
150150
// Scan for a single byte value by reading two `usize` words at a time.
151151
//
152152
// Split `text` in three parts
153-
// - unaligned inital part, before the first word aligned address in text
153+
// - unaligned initial part, before the first word aligned address in text
154154
// - body, scan by 2 words at a time
155155
// - the last remaining part, < 2 word size
156156
let len = text.len();

‎src/libstd/panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub use panicking::{take_handler, set_handler, PanicInfo, Location};
8484
/// recover safe. The general idea is that any mutable state which can be shared
8585
/// across `recover` is not recover safe by default. This is because it is very
8686
/// easy to witness a broken invariant outside of `recover` as the data is
87-
/// simply accesed as usual.
87+
/// simply accessed as usual.
8888
///
8989
/// Types like `&Mutex<T>`, however, are recover safe because they implement
9090
/// poisoning by default. They still allow witnessing a broken invariant, but

‎src/test/compile-fail/issue-30438-c.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Simplfied regression test for #30438, inspired by arielb1.
11+
// Simplified regression test for #30438, inspired by arielb1.
1212

1313
trait Trait { type Out; }
1414

‎src/test/compile-fail/traits-inductive-overflow-supertrait-oibit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
// OIBIT-based version of #29859, supertrait version. Test that using
12-
// a simple OIBIT `..` impl alone still doesn't allow arbitary bounds
12+
// a simple OIBIT `..` impl alone still doesn't allow arbitrary bounds
1313
// to be synthesized.
1414

1515
#![feature(optin_builtin_traits)]

‎src/test/run-pass/mir_trans_calls.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn test_fn_object(f: &Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
113113
fn test_fn_impl(f: &&Fn(i32, i32) -> i32, x: i32, y: i32) -> i32 {
114114
// This call goes through the Fn implementation for &Fn provided in
115115
// core::ops::impls. It expands to a static Fn::call() that calls the
116-
// Fn::call() implemenation of the object shim underneath.
116+
// Fn::call() implementation of the object shim underneath.
117117
f(x, y)
118118
}
119119

0 commit comments

Comments
 (0)