Skip to content

Commit 2b5e680

Browse files
committed
fix typos in compiler code
1 parent 8109c3b commit 2b5e680

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

Diff for: compiler/rustc_codegen_ssa/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ codegen_ssa_thorin_missing_referenced_unit = unit {$unit} referenced by executab
278278
279279
codegen_ssa_thorin_missing_required_section = input object missing required section `{$section}`
280280
281-
codegen_ssa_thorin_mixed_input_encodings = input objects haved mixed encodings
281+
codegen_ssa_thorin_mixed_input_encodings = input objects have mixed encodings
282282
283283
codegen_ssa_thorin_multiple_debug_info_section = multiple `.debug_info.dwo` sections
284284

Diff for: compiler/rustc_errors/src/tests.rs

+1-1
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

Diff for: compiler/rustc_hir_analysis/messages.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ hir_analysis_trait_object_declared_with_no_traits =
513513
at least one trait is required for an object type
514514
.alias_span = this alias does not contain a trait
515515
516-
hir_analysis_traits_with_defualt_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
516+
hir_analysis_traits_with_default_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
517517
.note = a trait object implements `{$traits}` if and only if `{$traits}` is one of the trait object's trait bounds
518518
519519
hir_analysis_transparent_enum_variant = transparent enum needs exactly one variant, but has {$number}

Diff for: compiler/rustc_hir_analysis/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ pub(crate) struct ImplForTyRequires {
13751375
}
13761376

13771377
#[derive(Diagnostic)]
1378-
#[diag(hir_analysis_traits_with_defualt_impl, code = E0321)]
1378+
#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
13791379
#[note]
13801380
pub(crate) struct TraitsWithDefaultImpl<'a> {
13811381
#[primary_span]

Diff for: compiler/rustc_resolve/src/errors.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -892,12 +892,12 @@ pub(crate) struct MacroExpandedExternCrateCannotShadowExternArguments {
892892

893893
#[derive(Diagnostic)]
894894
#[diag(resolve_elided_anonymous_lifetime_report_error, code = E0637)]
895-
pub(crate) struct ElidedAnonymousLivetimeReportError {
895+
pub(crate) struct ElidedAnonymousLifetimeReportError {
896896
#[primary_span]
897897
#[label]
898898
pub(crate) span: Span,
899899
#[subdiagnostic]
900-
pub(crate) suggestion: Option<ElidedAnonymousLivetimeReportErrorSuggestion>,
900+
pub(crate) suggestion: Option<ElidedAnonymousLifetimeReportErrorSuggestion>,
901901
}
902902

903903
#[derive(Diagnostic)]
@@ -911,7 +911,7 @@ pub(crate) struct LendingIteratorReportError {
911911

912912
#[derive(Diagnostic)]
913913
#[diag(resolve_anonymous_lifetime_non_gat_report_error)]
914-
pub(crate) struct AnonymousLivetimeNonGatReportError {
914+
pub(crate) struct AnonymousLifetimeNonGatReportError {
915915
#[primary_span]
916916
#[label]
917917
pub(crate) lifetime: Span,
@@ -922,7 +922,7 @@ pub(crate) struct AnonymousLivetimeNonGatReportError {
922922
resolve_elided_anonymous_lifetime_report_error_suggestion,
923923
applicability = "machine-applicable"
924924
)]
925-
pub(crate) struct ElidedAnonymousLivetimeReportErrorSuggestion {
925+
pub(crate) struct ElidedAnonymousLifetimeReportErrorSuggestion {
926926
#[suggestion_part(code = "for<'a> ")]
927927
pub(crate) lo: Span,
928928
#[suggestion_part(code = "'a ")]
@@ -931,7 +931,7 @@ pub(crate) struct ElidedAnonymousLivetimeReportErrorSuggestion {
931931

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

Diff for: compiler/rustc_resolve/src/late.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,7 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
17701770
} = &rib.kind
17711771
{
17721772
suggestion =
1773-
Some(errors::ElidedAnonymousLivetimeReportErrorSuggestion {
1773+
Some(errors::ElidedAnonymousLifetimeReportErrorSuggestion {
17741774
lo: span.shrink_to_lo(),
17751775
hi: lifetime.ident.span.shrink_to_hi(),
17761776
});
@@ -1794,18 +1794,18 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
17941794
ty: ty.span,
17951795
});
17961796
} else {
1797-
self.r.dcx().emit_err(errors::AnonymousLivetimeNonGatReportError {
1797+
self.r.dcx().emit_err(errors::AnonymousLifetimeNonGatReportError {
17981798
lifetime: lifetime.ident.span,
17991799
});
18001800
}
18011801
} else {
1802-
self.r.dcx().emit_err(errors::ElidedAnonymousLivetimeReportError {
1802+
self.r.dcx().emit_err(errors::ElidedAnonymousLifetimeReportError {
18031803
span: lifetime.ident.span,
18041804
suggestion,
18051805
});
18061806
}
18071807
} else {
1808-
self.r.dcx().emit_err(errors::ExplicitAnonymousLivetimeReportError {
1808+
self.r.dcx().emit_err(errors::ExplicitAnonymousLifetimeReportError {
18091809
span: lifetime.ident.span,
18101810
});
18111811
};

Diff for: compiler/rustc_session/src/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ impl RemapFileNameExt for rustc_span::FileName {
14811481
"one and only one scope should be passed to for_scope"
14821482
);
14831483
if sess.opts.unstable_opts.remap_path_scope.contains(scope) {
1484-
self.prefer_remapped_unconditionaly()
1484+
self.prefer_remapped_unconditionally()
14851485
} else {
14861486
self.prefer_local()
14871487
}

Diff for: compiler/rustc_span/src/lib.rs

+1-1
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

Diff for: compiler/rustc_trait_selection/src/traits/effects.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub fn evaluate_host_effect_obligation<'tcx>(
3838
Err(EvaluationFailure::NoSolution) => {}
3939
}
4040

41-
match evaluate_host_effect_from_selection_candiate(selcx, obligation) {
41+
match evaluate_host_effect_from_selection_candidate(selcx, obligation) {
4242
Ok(result) => return Ok(result),
4343
Err(EvaluationFailure::Ambiguous) => return Err(EvaluationFailure::Ambiguous),
4444
Err(EvaluationFailure::NoSolution) => {}
@@ -117,7 +117,7 @@ fn evaluate_host_effect_from_bounds<'tcx>(
117117
}
118118
}
119119

120-
fn evaluate_host_effect_from_selection_candiate<'tcx>(
120+
fn evaluate_host_effect_from_selection_candidate<'tcx>(
121121
selcx: &mut SelectionContext<'_, 'tcx>,
122122
obligation: &HostEffectObligation<'tcx>,
123123
) -> Result<ThinVec<PredicateObligation<'tcx>>, EvaluationFailure> {

Diff for: src/librustdoc/doctest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ impl ScrapedDocTest {
747747
item_path.push(' ');
748748
}
749749
let name =
750-
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionaly());
750+
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionally());
751751

752752
Self { filename, line, langstr, text, name }
753753
}

0 commit comments

Comments
 (0)