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).

0 commit comments

Comments
 (0)