Skip to content

Commit 3fba948

Browse files
committed
Fix typos
1 parent 717eb6c commit 3fba948

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ struct LoweringContext<'a, 'hir: 'a> {
148148
is_collecting_in_band_lifetimes: bool,
149149

150150
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
151-
/// When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
151+
/// When `is_collecting_in_band_lifetimes` is true, each lifetime is checked
152152
/// against this list to see if it is already in-scope, or if a definition
153153
/// needs to be created for it.
154154
///
@@ -257,7 +257,7 @@ enum ImplTraitPosition {
257257
/// Disallowed in `let` / `const` / `static` bindings.
258258
Binding,
259259

260-
/// All other posiitons.
260+
/// All other positions.
261261
Other,
262262
}
263263

@@ -363,7 +363,7 @@ enum ParenthesizedGenericArgs {
363363
/// elided bounds follow special rules. Note that this only covers
364364
/// cases where *nothing* is written; the `'_` in `Box<dyn Foo +
365365
/// '_>` is a case of "modern" elision.
366-
/// - **Deprecated** -- this coverse cases like `Ref<T>`, where the lifetime
366+
/// - **Deprecated** -- this covers cases like `Ref<T>`, where the lifetime
367367
/// parameter to ref is completely elided. `Ref<'_, T>` would be the modern,
368368
/// non-deprecated equivalent.
369369
///

compiler/rustc_ast_passes/src/ast_validation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl<'a> AstValidator<'a> {
516516
self.session.source_map().guess_head_span(self.extern_mod.unwrap().span)
517517
}
518518

519-
/// An `fn` in `extern { ... }` cannot have qualfiers, e.g. `async fn`.
519+
/// An `fn` in `extern { ... }` cannot have qualifiers, e.g. `async fn`.
520520
fn check_foreign_fn_headerless(&self, ident: Ident, span: Span, header: FnHeader) {
521521
if header.has_qualifiers() {
522522
self.err_handler()

compiler/rustc_data_structures/src/tagged_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod drop;
2424
pub use copy::CopyTaggedPtr;
2525
pub use drop::TaggedPtr;
2626

27-
/// This describes the pointer type encaspulated by TaggedPtr.
27+
/// This describes the pointer type encapsulated by TaggedPtr.
2828
///
2929
/// # Safety
3030
///

compiler/rustc_data_structures/src/transitive_relation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct TransitiveRelation<T: Eq + Hash> {
1818
edges: Vec<Edge>,
1919

2020
// This is a cached transitive closure derived from the edges.
21-
// Currently, we build it lazilly and just throw out any existing
21+
// Currently, we build it lazily and just throw out any existing
2222
// copy whenever a new edge is added. (The Lock is to permit
2323
// the lazy computation.) This is kind of silly, except for the
2424
// fact its size is tied to `self.elements.len()`, so I wanted to
@@ -255,7 +255,7 @@ impl<T: Clone + Debug + Eq + Hash> TransitiveRelation<T> {
255255
// argument is that, after step 2, we know that no element
256256
// can reach its successors (in the vector, not the graph).
257257
// After step 3, we know that no element can reach any of
258-
// its predecesssors (because of step 2) nor successors
258+
// its predecessors (because of step 2) nor successors
259259
// (because we just called `pare_down`)
260260
//
261261
// This same algorithm is used in `parents` below.

compiler/rustc_errors/src/emitter.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ impl Emitter for SilentEmitter {
513513
/// Maximum number of lines we will print for a multiline suggestion; arbitrary.
514514
///
515515
/// This should be replaced with a more involved mechanism to output multiline suggestions that
516-
/// more closely mimmics the regular diagnostic output, where irrelevant code lines are elided.
516+
/// more closely mimics the regular diagnostic output, where irrelevant code lines are elided.
517517
pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 6;
518518
/// Maximum number of suggestions to be shown
519519
///
@@ -887,7 +887,7 @@ impl EmitterWriter {
887887
// or the next are vertical line placeholders.
888888
|| (annotation.takes_space() // If either this or the next annotation is
889889
&& next.has_label()) // multiline start/end, move it to a new line
890-
|| (annotation.has_label() // so as not to overlap the orizontal lines.
890+
|| (annotation.has_label() // so as not to overlap the horizontal lines.
891891
&& next.takes_space())
892892
|| (annotation.takes_space() && next.takes_space())
893893
|| (overlaps(next, annotation, l)

0 commit comments

Comments
 (0)