Skip to content

Commit 4d94478

Browse files
committed
Auto merge of #147826 - Muscraft:update-typos, r=Noratrieb
Update typos I saw that `typos` was a few versions out of date and figured it would be a good idea to update it. Upgrading to `1.38.1` adds the [July](crate-ci/typos#1331), [August](crate-ci/typos#1345), and [September](crate-ci/typos#1370) dictionary updates. As part of this change, I also sorted the configuration file.
2 parents f5e2df7 + 12f6b96 commit 4d94478

File tree

27 files changed

+74
-63
lines changed

27 files changed

+74
-63
lines changed

compiler/rustc_builtin_macros/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ builtin_macros_requires_cfg_pattern =
283283
macro requires a cfg-pattern as an argument
284284
.label = cfg-pattern required
285285
286-
builtin_macros_source_uitls_expected_item = expected item, found `{$token}`
286+
builtin_macros_source_utils_expected_item = expected item, found `{$token}`
287287
288288
builtin_macros_takes_no_arguments = {$name} takes no arguments
289289

compiler/rustc_builtin_macros/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ pub(crate) struct AttributeOnlyUsableWithCrateType<'a> {
952952
}
953953

954954
#[derive(Diagnostic)]
955-
#[diag(builtin_macros_source_uitls_expected_item)]
955+
#[diag(builtin_macros_source_utils_expected_item)]
956956
pub(crate) struct ExpectedItem<'a> {
957957
#[primary_span]
958958
pub span: Span,

compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ fn write_bitcode_to_file(module: &ModuleCodegen<ModuleLlvm>, path: &Path) {
342342
}
343343
}
344344

345-
/// In what context is a dignostic handler being attached to a codegen unit?
345+
/// In what context is a diagnostic handler being attached to a codegen unit?
346346
pub(crate) enum CodegenDiagnosticsStage {
347347
/// Prelink optimization stage.
348348
Opt,

compiler/rustc_const_eval/src/interpret/call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
127127
} else if all_fields_1zst(def.variant(var1))? {
128128
def.variant(var0)
129129
} else {
130-
// No varant is all-1-ZST, so no NPO.
130+
// No variant is all-1-ZST, so no NPO.
131131
return interp_ok(layout);
132132
};
133133
// The "relevant" variant must have exactly one field, and its type is the "inner" type.

compiler/rustc_const_eval/src/interpret/projection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//!
33
//! OpTy and PlaceTy generally work by "let's see if we are actually an MPlaceTy, and do something custom if not".
44
//! For PlaceTy, the custom thing is basically always to call `force_allocation` and then use the MPlaceTy logic anyway.
5-
//! For OpTy, the custom thing on field pojections has to be pretty clever (since `Operand::Immediate` can have fields),
5+
//! For OpTy, the custom thing on field projections has to be pretty clever (since `Operand::Immediate` can have fields),
66
//! but for array/slice operations it only has to worry about `Operand::Uninit`. That makes the value part trivial,
77
//! but we still need to do bounds checking and adjust the layout. To not duplicate that with MPlaceTy, we actually
88
//! implement the logic on OpTy, and MPlaceTy calls that.

compiler/rustc_const_eval/src/interpret/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl EnteredTraceSpan for tracing::span::EnteredSpan {
7474
}
7575
}
7676

77-
/// Shortand for calling [crate::interpret::Machine::enter_trace_span] on a [tracing::info_span!].
77+
/// Shorthand for calling [crate::interpret::Machine::enter_trace_span] on a [tracing::info_span!].
7878
/// This is supposed to be compiled out when [crate::interpret::Machine::enter_trace_span] has the
7979
/// default implementation (i.e. when it does not actually enter the span but instead returns `()`).
8080
/// This macro takes a type implementing the [crate::interpret::Machine] trait as its first argument

compiler/rustc_hir_typeck/src/method/suggest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,10 +557,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
557557
}
558558
}
559559

560-
// If the shadowed binding has an itializer expression,
560+
// If the shadowed binding has an initializer expression,
561561
// use the initializer expression's ty to try to find the method again.
562562
// For example like: `let mut x = Vec::new();`,
563-
// `Vec::new()` is the itializer expression.
563+
// `Vec::new()` is the initializer expression.
564564
if let Some(self_ty) = self.fcx.node_ty_opt(binding.init_hir_id)
565565
&& self
566566
.fcx

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2959,7 +2959,7 @@ impl<'tcx> LateLintPass<'tcx> for AsmLabels {
29592959

29602960
for c in chars {
29612961
// Inside a template format arg, any character is permitted for the
2962-
// puproses of label detection because we assume that it can be
2962+
// purposes of label detection because we assume that it can be
29632963
// replaced with some other valid label string later. `options(raw)`
29642964
// asm blocks cannot have format args, so they are excluded from this
29652965
// special case.

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ where
980980
}
981981
}
982982

983-
/// This sohuld only be used when we're either instantiating a previously
983+
/// This should only be used when we're either instantiating a previously
984984
/// unconstrained "return value" or when we're sure that all aliases in
985985
/// the types are rigid.
986986
#[instrument(level = "trace", skip(self, param_env), ret)]

compiler/rustc_next_trait_solver/src/solve/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::solve::assembly::Candidate;
3939
///
4040
/// We previously used `cx.recursion_limit().0.checked_ilog2().unwrap_or(0)` for this.
4141
/// However, it feels unlikely that uncreasing the recursion limit by a power of two
42-
/// to get one more itereation is every useful or desirable. We now instead used a constant
42+
/// to get one more iteration is every useful or desirable. We now instead used a constant
4343
/// here. If there ever ends up some use-cases where a bigger number of fixpoint iterations
4444
/// is required, we can add a new attribute for that or revert this to be dependant on the
4545
/// recursion limit again. However, this feels very unlikely.

0 commit comments

Comments
 (0)