Skip to content

Commit c0216c8

Browse files
committed
Merge pull request #20674 from jbcrail/fix-misspelled-comments
Fix misspelled comments. Reviewed-by: steveklabnik
2 parents 7377c0b + e3b7fed commit c0216c8

File tree

29 files changed

+38
-38
lines changed

29 files changed

+38
-38
lines changed

src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ the guarantee that these issues are never caused by safe code.
12181218
(`offset` intrinsic), with
12191219
the exception of one byte past the end which is permitted.
12201220
* Using `std::ptr::copy_nonoverlapping_memory` (`memcpy32`/`memcpy64`
1221-
instrinsics) on overlapping buffers
1221+
intrinsics) on overlapping buffers
12221222
* Invalid values in primitive types, even in private fields/locals:
12231223
* Dangling/null references or boxes
12241224
* A value other than `false` (0) or `true` (1) in a `bool`

src/libcollections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ impl<K, V> Node<K, V> {
12201220
/// Node is full, so split it into two nodes, and yield the middle-most key-value pair
12211221
/// because we have one too many, and our parent now has one too few
12221222
fn split(&mut self) -> (K, V, Node<K, V>) {
1223-
// Necessary for correctness, but in a private funtion
1223+
// Necessary for correctness, but in a private function
12241224
debug_assert!(self.len() > 0);
12251225

12261226
let mut right = if self.is_leaf() {
@@ -1259,7 +1259,7 @@ impl<K, V> Node<K, V> {
12591259
}
12601260
}
12611261

1262-
/// Take all the values from right, seperated by the given key and value
1262+
/// Take all the values from right, separated by the given key and value
12631263
fn absorb(&mut self, key: K, val: V, mut right: Node<K, V>) {
12641264
// Necessary for correctness, but in a private function
12651265
// Just as a sanity check, make sure we can fit this guy in

src/libcollections/slice.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ impl<T> SliceExt for [T] {
987987
}
988988

989989
////////////////////////////////////////////////////////////////////////////////
990-
// Extension traits for slices over specifc kinds of data
990+
// Extension traits for slices over specific kinds of data
991991
////////////////////////////////////////////////////////////////////////////////
992992
#[unstable = "U should be an associated type"]
993993
/// An extension trait for concatenating slices
@@ -997,7 +997,7 @@ pub trait SliceConcatExt<T: ?Sized, U> {
997997
fn concat(&self) -> U;
998998

999999
/// Flattens a slice of `T` into a single value `U`, placing a
1000-
/// given seperator between each.
1000+
/// given separator between each.
10011001
#[stable]
10021002
fn connect(&self, sep: &T) -> U;
10031003
}

src/libcore/ptr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ use marker::{Send, Sized, Sync};
9797
use cmp::{PartialEq, Eq, Ord, PartialOrd};
9898
use cmp::Ordering::{self, Less, Equal, Greater};
9999

100-
// FIXME #19649: instrinsic docs don't render, so these have no docs :(
100+
// FIXME #19649: intrinsic docs don't render, so these have no docs :(
101101

102102
#[unstable]
103103
pub use intrinsics::copy_nonoverlapping_memory;
@@ -233,7 +233,7 @@ pub unsafe fn read_and_zero<T>(dest: *mut T) -> T {
233233
/// not drop the contents of `dst`. This could leak allocations or resources,
234234
/// so care must be taken not to overwrite an object that should be dropped.
235235
///
236-
/// This is appropriate for initializing uninitialized memory, or overwritting
236+
/// This is appropriate for initializing uninitialized memory, or overwriting
237237
/// memory that has previously been `read` from.
238238
#[inline]
239239
#[stable]

src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ pub fn encode_metadata(parms: EncodeParams, krate: &ast::Crate) -> Vec<u8> {
20342034

20352035
// And here we run into yet another obscure archive bug: in which metadata
20362036
// loaded from archives may have trailing garbage bytes. Awhile back one of
2037-
// our tests was failing sporadially on the OSX 64-bit builders (both nopt
2037+
// our tests was failing sporadically on the OSX 64-bit builders (both nopt
20382038
// and opt) by having rbml generate an out-of-bounds panic when looking at
20392039
// metadata.
20402040
//

src/librustc/middle/infer/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
//! Another option is to keep A and B as distinct variables but set their
126126
//! bounds in such a way that, whatever happens, we know that A <: B will hold.
127127
//! This can be achieved by ensuring that A.ub <: B.lb. In practice there
128-
//! are two ways to do that, depicted pictorally here:
128+
//! are two ways to do that, depicted pictorially here:
129129
//!
130130
//! ```text
131131
//! Before Option #1 Option #2

src/librustc/middle/infer/error_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
//!
3838
//! # Subtype Trace
3939
//!
40-
//! Determing whether `T1 <: T2` often involves a number of subtypes and
40+
//! Determining whether `T1 <: T2` often involves a number of subtypes and
4141
//! subconstraints along the way. A "TypeTrace" is an extended version
4242
//! of an origin that traces the types and other values that were being
4343
//! compared. It is not necessarily comprehensive (in fact, at the time of

src/librustc/middle/infer/higher_ranked/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
//!
199199
//! So the way we solve this is to add a fourth step that examines the
200200
//! constraints that refer to skolemized names. Basically, consider a
201-
//! non-directed verison of the constraint graph. Let `Tainted(x)` be the
201+
//! non-directed version of the constraint graph. Let `Tainted(x)` be the
202202
//! set of all things reachable from a skolemized variable `x`.
203203
//! `Tainted(x)` should not contain any regions that existed before the
204204
//! step at which the skolemization was performed. So this case here

src/librustc/middle/infer/region_inference/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//! - ConstrainVarSubVar(R_i, R_j) states that region variable R_i
3939
//! must be a subregion of R_j
4040
//! - ConstrainRegSubVar(R, R_i) states that the concrete region R
41-
//! (which must not be a variable) must be a subregion of the varibale R_i
41+
//! (which must not be a variable) must be a subregion of the variable R_i
4242
//! - ConstrainVarSubReg(R_i, R) is the inverse
4343
//!
4444
//! # Building up the constraints

src/librustc/middle/infer/region_inference/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub enum RegionResolutionError<'tcx> {
106106

107107
/// `GenericBoundFailure(p, s, a, bs)
108108
///
109-
/// The parameter/assocated-type `p` must be known to outlive the lifetime
109+
/// The parameter/associated-type `p` must be known to outlive the lifetime
110110
/// `a`, but it is only known to outlive `bs` (and none of the
111111
/// regions in `bs` outlive `a`).
112112
GenericBoundFailure(SubregionOrigin<'tcx>, GenericKind<'tcx>, Region, Vec<Region>),
@@ -337,7 +337,7 @@ impl<'a, 'tcx> RegionVarBindings<'a, 'tcx> {
337337
///
338338
/// The idea is to always create a snapshot. Skolemized regions
339339
/// can be created in the context of this snapshot, but once the
340-
/// snapshot is commited or rolled back, their numbers will be
340+
/// snapshot is committed or rolled back, their numbers will be
341341
/// recycled, so you must be finished with them. See the extensive
342342
/// comments in `higher_ranked.rs` to see how it works (in
343343
/// particular, the subtyping comparison).

src/librustc/middle/traits/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ we only need to do a "shallow" selection for an obligation. That is, we wish to
254254
identify which impl applies, but we do not (yet) need to decide how to select
255255
any nested obligations. Nonetheless, we *do* currently do a complete resolution,
256256
and that is because it can sometimes inform the results of type inference. That is,
257-
we do not have the full substitutions in terms of the type varibales of the impl available
257+
we do not have the full substitutions in terms of the type variables of the impl available
258258
to us, so we must run trait selection to figure everything out.
259259
260260
Here is an example:

src/librustc/middle/traits/object_safety.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub enum ObjectSafetyViolation<'tcx> {
3131
/// Self : Sized declared on the trait
3232
SizedSelf,
3333

34-
/// Method has someting illegal
34+
/// Method has something illegal
3535
Method(Rc<ty::Method<'tcx>>, MethodViolationCode),
3636
}
3737

@@ -256,7 +256,7 @@ fn contains_illegal_self_type_reference<'tcx>(tcx: &ty::ctxt<'tcx>,
256256
ty::ty_projection(ref data) => {
257257
// This is a projected type `<Foo as SomeTrait>::X`.
258258

259-
// Compute supertraits of current trait lazilly.
259+
// Compute supertraits of current trait lazily.
260260
if supertraits.is_none() {
261261
let trait_def = ty::lookup_trait_def(tcx, trait_def_id);
262262
let trait_ref = ty::Binder(trait_def.trait_ref.clone());

src/librustc/middle/traits/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ fn opt_normalize_projection_type<'a,'b,'tcx>(
337337
}
338338

339339
/// in various error cases, we just set ty_err and return an obligation
340-
/// that, when fulfiled, will lead to an error
340+
/// that, when fulfilled, will lead to an error
341341
fn normalize_to_error<'a,'tcx>(selcx: &mut SelectionContext<'a,'tcx>,
342342
projection_ty: ty::ProjectionTy<'tcx>,
343343
cause: ObligationCause<'tcx>,

src/librustc/middle/traits/select.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
392392
// `$1`), on the condition that `$1 : Eq`. We will then wind
393393
// up with many candidates (since that are other `Eq` impls
394394
// that apply) and try to winnow things down. This results in
395-
// a recurssive evaluation that `$1 : Eq` -- as you can
395+
// a recursive evaluation that `$1 : Eq` -- as you can
396396
// imagine, this is just where we started. To avoid that, we
397397
// check for unbound variables and return an ambiguous (hence possible)
398398
// match if we've seen this trait before.
@@ -604,7 +604,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
604604
}
605605

606606
// If there are *STILL* multiple candidates, give up and
607-
// report ambiguiuty.
607+
// report ambiguity.
608608
if candidates.len() > 1 {
609609
debug!("multiple matches, ambig");
610610
return Ok(None);
@@ -1119,7 +1119,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
11191119
///
11201120
/// This is generally true if either:
11211121
/// - candidate i and candidate j are equivalent; or,
1122-
/// - candidate i is a conrete impl and candidate j is a where clause bound,
1122+
/// - candidate i is a concrete impl and candidate j is a where clause bound,
11231123
/// and the concrete impl is applicable to the types in the where clause bound.
11241124
///
11251125
/// The last case refers to cases where there are blanket impls (often conditional

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ impl<'tcx> PolyFnOutput<'tcx> {
10791079
///
10801080
/// - `inputs` is the list of arguments and their modes.
10811081
/// - `output` is the return type.
1082-
/// - `variadic` indicates whether this is a varidic function. (only true for foreign fns)
1082+
/// - `variadic` indicates whether this is a variadic function. (only true for foreign fns)
10831083
#[derive(Clone, PartialEq, Eq, Hash)]
10841084
pub struct FnSig<'tcx> {
10851085
pub inputs: Vec<Ty<'tcx>>,

src/librustc/middle/ty_fold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! In some cases, we follow a degenerate pattern where we do not have
3131
//! a `fold_T` nor `super_fold_T` method. Instead, `T.fold_with`
3232
//! traverses the structure directly. This is suboptimal because the
33-
//! behavior cannot be overriden, but it's much less work to implement.
33+
//! behavior cannot be overridden, but it's much less work to implement.
3434
//! If you ever *do* need an override that doesn't exist, it's not hard
3535
//! to convert the degenerate pattern into the proper thing.
3636

src/librustc/util/snapshot_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//!
1515
//! This vector is intended to be used as part of an abstraction, not serve as a complete
1616
//! abstraction on its own. As such, while it will roll back most changes on its own, it also
17-
//! supports a `get_mut` operation that gives you an abitrary mutable pointer into the vector. To
17+
//! supports a `get_mut` operation that gives you an arbitrary mutable pointer into the vector. To
1818
//! ensure that any changes you make this with this pointer are rolled back, you must invoke
1919
//! `record` to record any changes you make and also supplying a delegate capable of reversing
2020
//! those changes.

src/librustc_back/target/arm_linux_androideabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn target() -> Target {
1616
// Many of the symbols defined in compiler-rt are also defined in libgcc. Android
1717
// linker doesn't like that by default.
1818
base.pre_link_args.push("-Wl,--allow-multiple-definition".to_string());
19-
// FIXME #17437 (and #17448): Android doesn't support position dependant executables anymore.
19+
// FIXME #17437 (and #17448): Android doesn't support position dependent executables anymore.
2020
base.position_independent_executables = false;
2121

2222
Target {

src/librustc_trans/trans/meth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ pub fn trans_object_shim<'a, 'tcx>(
567567
let object_substs = upcast_trait_ref.substs.clone().erase_regions();
568568
debug!("trans_object_shim: object_substs={}", object_substs.repr(tcx));
569569

570-
// Lookup the type of this method as deeclared in the trait and apply substitutions.
570+
// Lookup the type of this method as declared in the trait and apply substitutions.
571571
let method_ty = match ty::trait_item(tcx, trait_id, method_offset_in_trait) {
572572
ty::MethodTraitItem(method) => method,
573573
ty::TypeTraitItem(_) => {

src/librustc_typeck/check/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub fn check_pat<'a, 'tcx>(pcx: &pat_ctxt<'a, 'tcx>,
9797

9898
fcx.write_ty(pat.id, lhs_ty);
9999

100-
// subtyping doens't matter here, as the value is some kind of scalar
100+
// subtyping doesn't matter here, as the value is some kind of scalar
101101
demand::eqtype(fcx, pat.span, expected, lhs_ty);
102102
}
103103
ast::PatEnum(..) | ast::PatIdent(..) if pat_is_const(&tcx.def_map, pat) => {

src/librustc_typeck/check/method/confirm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'a,'tcx> ConfirmContext<'a,'tcx> {
122122

123123
// If this is an `&mut self` method, bias the receiver
124124
// expression towards mutability (this will switch
125-
// e.g. `Deref` to `DerefMut` in oveloaded derefs and so on).
125+
// e.g. `Deref` to `DerefMut` in overloaded derefs and so on).
126126
self.fixup_derefs_on_method_receiver_if_necessary(&callee);
127127

128128
callee

src/librustc_typeck/check/wf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
210210
// We are stricter on the trait-ref in an impl than the
211211
// self-type. In particular, we enforce region
212212
// relationships. The reason for this is that (at least
213-
// presently) "appyling" an impl does not require that the
213+
// presently) "applying" an impl does not require that the
214214
// application site check the well-formedness constraints on the
215215
// trait reference. Instead, this is done at the impl site.
216216
// Arguably this is wrong and we should treat the trait-reference

src/libstd/collections/hash/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ fn test_resize_policy() {
184184
// simply introduce a new bit to the front of the hash. Therefore, if an
185185
// elements has ideal index i in the old table, it can have one of two ideal
186186
// locations in the new table. If the new bit is 0, then the new ideal index
187-
// is i. If the new bit is 1, then the new ideal index is n + i. Intutively,
187+
// is i. If the new bit is 1, then the new ideal index is n + i. Intuitively,
188188
// we are producing two independent tables of size n, and for each element we
189189
// independently choose which table to insert it into with equal probability.
190190
// However the rather than wrapping around themselves on overflowing their

src/libstd/ffi/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl CString {
104104
unsafe { mem::transmute(self.as_slice()) }
105105
}
106106

107-
/// Equivalend to `as_slice_with_nul` except that the type returned is a
107+
/// Equivalent to `as_slice_with_nul` except that the type returned is a
108108
/// `u8` slice instead of a `libc::c_char` slice.
109109
pub fn as_bytes_with_nul(&self) -> &[u8] {
110110
unsafe { mem::transmute(self.as_slice_with_nul()) }

src/libstd/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
//! ```
107107
//!
108108
//! This is invalid because the first argument is both referred to as a
109-
//! hexidecimal as well as an
109+
//! hexadecimal as well as an
110110
//! octal.
111111
//!
112112
//! There are various parameters which do require a particular type, however.

src/libstd/sys/windows/thread_local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ unsafe fn unregister_dtor(key: Key) -> bool {
191191
//
192192
// The callback specified receives a number of parameters from... someone!
193193
// (the kernel? the runtime? I'm not qute sure!) There are a few events that
194-
// this gets invoked for, but we're currentl only interested on when a
194+
// this gets invoked for, but we're currently only interested on when a
195195
// thread or a process "detaches" (exits). The process part happens for the
196196
// last thread and the thread part happens for any normal thread.
197197
//

src/libstd/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ use thunk::Thunk;
164164
use sys::thread as imp;
165165
use sys_common::{stack, thread_info};
166166

167-
/// Thread configuation. Provides detailed control over the properties
167+
/// Thread configuration. Provides detailed control over the properties
168168
/// and behavior of new threads.
169169
#[stable]
170170
pub struct Builder {

src/libsyntax/parse/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2749,7 +2749,7 @@ impl<'a> Parser<'a> {
27492749
let open_span = self.span;
27502750
self.bump();
27512751

2752-
// Parse the token trees within the delimeters
2752+
// Parse the token trees within the delimiters
27532753
let tts = self.parse_seq_to_before_end(
27542754
&token::CloseDelim(delim),
27552755
seq_sep_none(),

src/libsyntax/parse/token.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub enum BinOpToken {
4343
Shr,
4444
}
4545

46-
/// A delimeter token
46+
/// A delimiter token
4747
#[derive(Clone, RustcEncodable, RustcDecodable, PartialEq, Eq, Hash, Show, Copy)]
4848
pub enum DelimToken {
4949
/// A round parenthesis: `(` or `)`
@@ -134,9 +134,9 @@ pub enum Token {
134134
Pound,
135135
Dollar,
136136
Question,
137-
/// An opening delimeter, eg. `{`
137+
/// An opening delimiter, eg. `{`
138138
OpenDelim(DelimToken),
139-
/// A closing delimeter, eg. `}`
139+
/// A closing delimiter, eg. `}`
140140
CloseDelim(DelimToken),
141141

142142
/* Literals */

0 commit comments

Comments
 (0)