Skip to content

Commit 08a2bef

Browse files
committed
Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnik
The spelling corrections were made in both documentation comments and regular comments.
2 parents 6bf0cd8 + dc2e444 commit 08a2bef

File tree

27 files changed

+36
-36
lines changed

27 files changed

+36
-36
lines changed

src/doc/trpl/ownership.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
523523
fn debug(lvl: u32, s: &str); // elided
524524
fn debug<'a>(lvl: u32, s: &'a str); // expanded
525525
526-
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
526+
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
527527
// reference (`&`). Only things relating to references (such as a `struct`
528528
// which contains a reference) need lifetimes.
529529

src/grammar/parser-lalr.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ maybe_stmts
11951195
//
11961196
// There are also two other expr subtypes: first, nonparen_expr
11971197
// disallows exprs surrounded by parens (including tuple expressions),
1198-
// this is neccesary for BOX (place) expressions, so a parens expr
1198+
// this is necessary for BOX (place) expressions, so a parens expr
11991199
// following the BOX is always parsed as the place. There is also
12001200
// expr_norange used in index_expr, which disallows '..' in
12011201
// expressions as that has special meaning inside of brackets.

src/liballoc/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
311311
///
312312
/// // stuff
313313
///
314-
/// drop(five); // explict drop
314+
/// drop(five); // explicit drop
315315
/// }
316316
/// {
317317
/// let five = Arc::new(5);
@@ -441,7 +441,7 @@ impl<T: Sync + Send> Drop for Weak<T> {
441441
///
442442
/// // stuff
443443
///
444-
/// drop(weak_five); // explict drop
444+
/// drop(weak_five); // explicit drop
445445
/// }
446446
/// {
447447
/// let five = Arc::new(5);

src/liballoc/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<T> Drop for Rc<T> {
383383
///
384384
/// // stuff
385385
///
386-
/// drop(five); // explict drop
386+
/// drop(five); // explicit drop
387387
/// }
388388
/// {
389389
/// let five = Rc::new(5);
@@ -688,7 +688,7 @@ impl<T> Drop for Weak<T> {
688688
///
689689
/// // stuff
690690
///
691-
/// drop(weak_five); // explict drop
691+
/// drop(weak_five); // explicit drop
692692
/// }
693693
/// {
694694
/// let five = Rc::new(5);

src/libcollections/btree/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ impl<'a, K: 'a, V: 'a> Handle<&'a mut Node<K, V>, handle::Edge, handle::Internal
669669

670670
impl<K, V, NodeRef: Deref<Target=Node<K, V>>> Handle<NodeRef, handle::Edge, handle::Internal> {
671671
// This doesn't exist because there are no uses for it,
672-
// but is fine to add, analagous to edge_mut.
672+
// but is fine to add, analogous to edge_mut.
673673
//
674674
// /// Returns a reference to the edge pointed-to by this handle. This should not be
675675
// /// confused with `node`, which references the parent node of what is returned here.

src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pub trait IteratorExt: Iterator + Sized {
260260
}
261261

262262
/// Creates an iterator that applies the predicate to each element returned
263-
/// by this iterator. The only elements that will be yieled are those that
263+
/// by this iterator. The only elements that will be yielded are those that
264264
/// make the predicate evaluate to `true`.
265265
///
266266
/// # Examples

src/librustc/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ register_long_diagnostics! {
1414
E0001: r##"
1515
This error suggests that the expression arm corresponding to the noted pattern
1616
will never be reached as for all possible values of the expression being matched,
17-
one of the preceeding patterns will match.
17+
one of the preceding patterns will match.
1818
19-
This means that perhaps some of the preceeding patterns are too general, this
19+
This means that perhaps some of the preceding patterns are too general, this
2020
one is too specific or the ordering is incorrect.
2121
"##,
2222

src/librustc/middle/traits/select.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
775775
-> bool
776776
{
777777
// In general, it's a good idea to cache results, even
778-
// ambigious ones, to save us some trouble later. But we have
778+
// ambiguous ones, to save us some trouble later. But we have
779779
// to be careful not to cache results that could be
780780
// invalidated later by advances in inference. Normally, this
781781
// is not an issue, because any inference variables whose
@@ -1273,7 +1273,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
12731273
///
12741274
/// - The impl is conditional, in which case we may not have winnowed it out
12751275
/// because we don't know if the conditions apply, but the where clause is basically
1276-
/// telling us taht there is some impl, though not necessarily the one we see.
1276+
/// telling us that there is some impl, though not necessarily the one we see.
12771277
///
12781278
/// In both cases we prefer to take the where clause, which is
12791279
/// essentially harmless. See issue #18453 for more details of

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2520,7 +2520,7 @@ impl FlagComputation {
25202520
fn add_bound_computation(&mut self, computation: &FlagComputation) {
25212521
self.add_flags(computation.flags);
25222522

2523-
// The types that contributed to `computation` occured within
2523+
// The types that contributed to `computation` occurred within
25242524
// a region binder, so subtract one from the region depth
25252525
// within when adding the depth to `self`.
25262526
let depth = computation.depth;

src/librustc_borrowck/borrowck/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
//! which contains an empty set of actions, still has a purpose---it
143143
//! prevents moves from `LV`. I chose not to make `MOVE` a fourth kind of
144144
//! action because that would imply that sometimes moves are permitted
145-
//! from restrictived values, which is not the case.
145+
//! from restricted values, which is not the case.
146146
//!
147147
//! #### Example
148148
//!

0 commit comments

Comments
 (0)