Skip to content

Commit 5763fa7

Browse files
authored
Rollup merge of #104349 - rustaceanclub:master, r=oli-obk
fix some typos in comments
2 parents 43bb507 + 442f848 commit 5763fa7

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

compiler/rustc_const_eval/src/interpret/operand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
376376

377377
/// Read an immediate from a place, asserting that that is possible with the given layout.
378378
///
379-
/// If this suceeds, the `ImmTy` is never `Uninit`.
379+
/// If this succeeds, the `ImmTy` is never `Uninit`.
380380
#[inline(always)]
381381
pub fn read_immediate(
382382
&self,

compiler/rustc_expand/src/mbe/macro_rules.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ fn expand_macro<'cx>(
333333
assert!(try_success_result.is_err(), "Macro matching returned a success on the second try");
334334

335335
if let Some(result) = tracker.result {
336-
// An irrecoverable error occured and has been emitted.
336+
// An irrecoverable error occurred and has been emitted.
337337
return result;
338338
}
339339

compiler/rustc_feature/src/builtin_attrs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pub enum AttributeDuplicates {
147147
FutureWarnPreceding,
148148
}
149149

150-
/// A conveniece macro to deal with `$($expr)?`.
150+
/// A convenience macro to deal with `$($expr)?`.
151151
macro_rules! or_default {
152152
($default:expr,) => {
153153
$default

compiler/rustc_hir_typeck/src/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct ClosureSignatures<'tcx> {
3535
bound_sig: ty::PolyFnSig<'tcx>,
3636
/// The signature within the function body.
3737
/// This mostly differs in the sense that lifetimes are now early bound and any
38-
/// opaque types from the signature expectation are overriden in case there are
38+
/// opaque types from the signature expectation are overridden in case there are
3939
/// explicit hidden types written by the user in the closure signature.
4040
liberated_sig: ty::FnSig<'tcx>,
4141
}

compiler/rustc_lint/src/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ fn lint_int_literal<'tcx>(
360360
}
361361

362362
if lint_overflowing_range_endpoint(cx, lit, v, max, e, t.name_str()) {
363-
// The overflowing literal lint was emited by `lint_overflowing_range_endpoint`.
363+
// The overflowing literal lint was emitted by `lint_overflowing_range_endpoint`.
364364
return;
365365
}
366366

@@ -429,7 +429,7 @@ fn lint_uint_literal<'tcx>(
429429
}
430430
}
431431
if lint_overflowing_range_endpoint(cx, lit, lit_val, max, e, t.name_str()) {
432-
// The overflowing literal lint was emited by `lint_overflowing_range_endpoint`.
432+
// The overflowing literal lint was emitted by `lint_overflowing_range_endpoint`.
433433
return;
434434
}
435435
if let Some(repr_str) = get_bin_hex_repr(cx, lit) {

compiler/rustc_middle/src/mir/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ impl<'tcx> Place<'tcx> {
15411541
/// If MirPhase >= Derefered and if projection contains Deref,
15421542
/// It's guaranteed to be in the first place
15431543
pub fn has_deref(&self) -> bool {
1544-
// To make sure this is not accidently used in wrong mir phase
1544+
// To make sure this is not accidentally used in wrong mir phase
15451545
debug_assert!(
15461546
self.projection.is_empty() || !self.projection[1..].contains(&PlaceElem::Deref)
15471547
);

compiler/rustc_middle/src/mir/syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub enum MirPhase {
8585
///
8686
/// Also note that the lint pass which reports eg `200_u8 + 200_u8` as an error is run as a part
8787
/// of analysis to runtime MIR lowering. To ensure lints are reported reliably, this means that
88-
/// transformations which may supress such errors should not run on analysis MIR.
88+
/// transformations which may suppress such errors should not run on analysis MIR.
8989
Runtime(RuntimePhase),
9090
}
9191

compiler/rustc_mir_build/src/build/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
118118
else_block: Some(else_block),
119119
} => {
120120
// When lowering the statement `let <pat> = <expr> else { <else> };`,
121-
// the `<else>` block is nested in the parent scope enclosing this statment.
121+
// the `<else>` block is nested in the parent scope enclosing this statement.
122122
// That scope is usually either the enclosing block scope,
123123
// or the remainder scope of the last statement.
124124
// This is to make sure that temporaries instantiated in `<expr>` are dropped

compiler/rustc_resolve/src/effective_visibilities.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ impl<'r, 'a> EffectiveVisibilitiesVisitor<'r, 'a> {
7272
update(node_id);
7373
if let ImportKind::Single { additional_ids: (id1, id2), .. } = import.kind {
7474
// In theory all the single import IDs have individual visibilities and
75-
// effective visibilities, but in practice these IDs go straigth to HIR
75+
// effective visibilities, but in practice these IDs go straight to HIR
7676
// where all their few uses assume that their (effective) visibility
7777
// applies to the whole syntactic `use` item. So they all get the same
7878
// value which is the maximum of all bindings. Maybe HIR for imports

compiler/rustc_target/src/spec/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub enum Lld {
114114
/// relevant now.
115115
///
116116
/// The second goal is to keep the number of flavors to the minimum if possible.
117-
/// LLD somewhat forces our hand here because that linker is self-sufficent only if its executable
117+
/// LLD somewhat forces our hand here because that linker is self-sufficient only if its executable
118118
/// (`argv[0]`) is named in specific way, otherwise it doesn't work and requires a
119119
/// `-flavor LLD_FLAVOR` argument to choose which logic to use. Our shipped `rust-lld` in
120120
/// particular is not named in such specific way, so it needs the flavor option, so we make our

src/librustdoc/json/conversions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ impl FromWithTcx<clean::Variant> for Variant {
674674
impl FromWithTcx<clean::Discriminant> for Discriminant {
675675
fn from_tcx(disr: clean::Discriminant, tcx: TyCtxt<'_>) -> Self {
676676
Discriminant {
677-
// expr is only none if going throught the inlineing path, which gets
677+
// expr is only none if going through the inlineing path, which gets
678678
// `rustc_middle` types, not `rustc_hir`, but because JSON never inlines
679679
// the expr is always some.
680680
expr: disr.expr(tcx).unwrap(),

src/librustdoc/json/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl<'tcx> FormatRenderer<'tcx> for JsonRenderer<'tcx> {
277277

278278
let e = ExternalCrate { crate_num: LOCAL_CRATE };
279279

280-
// FIXME(adotinthevoid): Remove this, as it's not consistant with not
280+
// FIXME(adotinthevoid): Remove this, as it's not consistent with not
281281
// inlining foreign items.
282282
let foreign_trait_items = self.get_trait_items();
283283
let mut index = (*self.index).clone().into_inner();

src/rustdoc-json-types/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct ItemSummary {
5353
/// `["std", "io", "lazy", "Lazy"]` for `std::io::lazy::Lazy`).
5454
///
5555
/// Note that items can appear in multiple paths, and the one chosen is implementation
56-
/// defined. Currenty, this is the full path to where the item was defined. Eg
56+
/// defined. Currently, this is the full path to where the item was defined. Eg
5757
/// [`String`] is currently `["alloc", "string", "String"]` and [`HashMap`] is
5858
/// `["std", "collections", "hash", "map", "HashMap"]`, but this is subject to change.
5959
pub path: Vec<String>,
@@ -351,7 +351,7 @@ pub enum Variant {
351351
/// A variant with unnamed fields.
352352
///
353353
/// Unlike most of json, `#[doc(hidden)]` fields will be given as `None`
354-
/// instead of being ommited, because order matters.
354+
/// instead of being omitted, because order matters.
355355
///
356356
/// ```rust
357357
/// enum Demo {

0 commit comments

Comments
 (0)