Skip to content

Commit 26f8821

Browse files
committed
fix typos in compiler code
1 parent e48b833 commit 26f8821

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

compiler/rustc_codegen_ssa/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ codegen_ssa_thorin_missing_referenced_unit = unit {$unit} referenced by executab
283283
284284
codegen_ssa_thorin_missing_required_section = input object missing required section `{$section}`
285285
286-
codegen_ssa_thorin_mixed_input_encodings = input objects haved mixed encodings
286+
codegen_ssa_thorin_mixed_input_encodings = input objects have mixed encodings
287287
288288
codegen_ssa_thorin_multiple_debug_info_section = multiple `.debug_info.dwo` sections
289289

compiler/rustc_errors/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn wellformed_fluent() {
9797
}
9898

9999
#[test]
100-
fn misformed_fluent() {
100+
fn malformed_fluent() {
101101
let dummy = make_dummy("mir_build_borrow_of_moved_value = borrow of moved value
102102
.label = value moved into `{name}` here
103103
.occurs_because_label = move occurs because `{$oops}` has type `{$ty}` which does not implement the `Copy` trait

compiler/rustc_hir_analysis/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ hir_analysis_trait_object_declared_with_no_traits =
527527
at least one trait is required for an object type
528528
.alias_span = this alias does not contain a trait
529529
530-
hir_analysis_traits_with_defualt_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
530+
hir_analysis_traits_with_default_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
531531
.note = a trait object implements `{$traits}` if and only if `{$traits}` is one of the trait object's trait bounds
532532
533533
hir_analysis_transparent_enum_variant = transparent enum needs exactly one variant, but has {$number}

compiler/rustc_hir_analysis/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ pub(crate) struct ImplForTyRequires {
13911391
}
13921392

13931393
#[derive(Diagnostic)]
1394-
#[diag(hir_analysis_traits_with_defualt_impl, code = E0321)]
1394+
#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
13951395
#[note]
13961396
pub(crate) struct TraitsWithDefaultImpl<'a> {
13971397
#[primary_span]

compiler/rustc_resolve/src/errors.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,12 @@ pub(crate) struct MacroExpandedExternCrateCannotShadowExternArguments {
891891

892892
#[derive(Diagnostic)]
893893
#[diag(resolve_elided_anonymous_lifetime_report_error, code = E0637)]
894-
pub(crate) struct ElidedAnonymousLivetimeReportError {
894+
pub(crate) struct ElidedAnonymousLifetimeReportError {
895895
#[primary_span]
896896
#[label]
897897
pub(crate) span: Span,
898898
#[subdiagnostic]
899-
pub(crate) suggestion: Option<ElidedAnonymousLivetimeReportErrorSuggestion>,
899+
pub(crate) suggestion: Option<ElidedAnonymousLifetimeReportErrorSuggestion>,
900900
}
901901

902902
#[derive(Diagnostic)]
@@ -910,7 +910,7 @@ pub(crate) struct LendingIteratorReportError {
910910

911911
#[derive(Diagnostic)]
912912
#[diag(resolve_anonymous_lifetime_non_gat_report_error)]
913-
pub(crate) struct AnonymousLivetimeNonGatReportError {
913+
pub(crate) struct AnonymousLifetimeNonGatReportError {
914914
#[primary_span]
915915
#[label]
916916
pub(crate) lifetime: Span,
@@ -921,7 +921,7 @@ pub(crate) struct AnonymousLivetimeNonGatReportError {
921921
resolve_elided_anonymous_lifetime_report_error_suggestion,
922922
applicability = "machine-applicable"
923923
)]
924-
pub(crate) struct ElidedAnonymousLivetimeReportErrorSuggestion {
924+
pub(crate) struct ElidedAnonymousLifetimeReportErrorSuggestion {
925925
#[suggestion_part(code = "for<'a> ")]
926926
pub(crate) lo: Span,
927927
#[suggestion_part(code = "'a ")]
@@ -930,7 +930,7 @@ pub(crate) struct ElidedAnonymousLivetimeReportErrorSuggestion {
930930

931931
#[derive(Diagnostic)]
932932
#[diag(resolve_explicit_anonymous_lifetime_report_error, code = E0637)]
933-
pub(crate) struct ExplicitAnonymousLivetimeReportError {
933+
pub(crate) struct ExplicitAnonymousLifetimeReportError {
934934
#[primary_span]
935935
#[label]
936936
pub(crate) span: Span,

compiler/rustc_resolve/src/late.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1817,7 +1817,7 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
18171817
} = &rib.kind
18181818
{
18191819
suggestion =
1820-
Some(errors::ElidedAnonymousLivetimeReportErrorSuggestion {
1820+
Some(errors::ElidedAnonymousLifetimeReportErrorSuggestion {
18211821
lo: span.shrink_to_lo(),
18221822
hi: lifetime.ident.span.shrink_to_hi(),
18231823
});
@@ -1841,18 +1841,18 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
18411841
ty: ty.span,
18421842
});
18431843
} else {
1844-
self.r.dcx().emit_err(errors::AnonymousLivetimeNonGatReportError {
1844+
self.r.dcx().emit_err(errors::AnonymousLifetimeNonGatReportError {
18451845
lifetime: lifetime.ident.span,
18461846
});
18471847
}
18481848
} else {
1849-
self.r.dcx().emit_err(errors::ElidedAnonymousLivetimeReportError {
1849+
self.r.dcx().emit_err(errors::ElidedAnonymousLifetimeReportError {
18501850
span: lifetime.ident.span,
18511851
suggestion,
18521852
});
18531853
}
18541854
} else {
1855-
self.r.dcx().emit_err(errors::ExplicitAnonymousLivetimeReportError {
1855+
self.r.dcx().emit_err(errors::ExplicitAnonymousLifetimeReportError {
18561856
span: lifetime.ident.span,
18571857
});
18581858
};

compiler/rustc_session/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ impl RemapFileNameExt for rustc_span::FileName {
14731473
"one and only one scope should be passed to for_scope"
14741474
);
14751475
if sess.opts.unstable_opts.remap_path_scope.contains(scope) {
1476-
self.prefer_remapped_unconditionaly()
1476+
self.prefer_remapped_unconditionally()
14771477
} else {
14781478
self.prefer_local()
14791479
}

compiler/rustc_span/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ impl FileName {
390390
}
391391
}
392392

393-
pub fn prefer_remapped_unconditionaly(&self) -> FileNameDisplay<'_> {
393+
pub fn prefer_remapped_unconditionally(&self) -> FileNameDisplay<'_> {
394394
FileNameDisplay { inner: self, display_pref: FileNameDisplayPreference::Remapped }
395395
}
396396

compiler/rustc_trait_selection/src/traits/effects.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub fn evaluate_host_effect_obligation<'tcx>(
5454
Err(EvaluationFailure::NoSolution) => {}
5555
}
5656

57-
match evaluate_host_effect_from_selection_candiate(selcx, obligation) {
57+
match evaluate_host_effect_from_selection_candidate(selcx, obligation) {
5858
Ok(result) => return Ok(result),
5959
Err(EvaluationFailure::Ambiguous) => return Err(EvaluationFailure::Ambiguous),
6060
Err(EvaluationFailure::NoSolution) => {}
@@ -332,7 +332,7 @@ fn evaluate_host_effect_for_destruct_goal<'tcx>(
332332
.collect())
333333
}
334334

335-
fn evaluate_host_effect_from_selection_candiate<'tcx>(
335+
fn evaluate_host_effect_from_selection_candidate<'tcx>(
336336
selcx: &mut SelectionContext<'_, 'tcx>,
337337
obligation: &HostEffectObligation<'tcx>,
338338
) -> Result<ThinVec<PredicateObligation<'tcx>>, EvaluationFailure> {

src/librustdoc/doctest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ impl ScrapedDocTest {
783783
item_path.push(' ');
784784
}
785785
let name =
786-
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionaly());
786+
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionally());
787787

788788
Self { filename, line, langstr, text, name }
789789
}

0 commit comments

Comments
 (0)