Skip to content

Commit 805b688

Browse files
committed
fix typos in compiler code
1 parent 67ee831 commit 805b688

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
@@ -289,7 +289,7 @@ codegen_ssa_thorin_missing_referenced_unit = unit {$unit} referenced by executab
289289
290290
codegen_ssa_thorin_missing_required_section = input object missing required section `{$section}`
291291
292-
codegen_ssa_thorin_mixed_input_encodings = input objects haved mixed encodings
292+
codegen_ssa_thorin_mixed_input_encodings = input objects have mixed encodings
293293
294294
codegen_ssa_thorin_multiple_debug_info_section = multiple `.debug_info.dwo` sections
295295

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
@@ -517,7 +517,7 @@ hir_analysis_trait_object_declared_with_no_traits =
517517
at least one trait is required for an object type
518518
.alias_span = this alias does not contain a trait
519519
520-
hir_analysis_traits_with_defualt_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
520+
hir_analysis_traits_with_default_impl = traits with a default impl, like `{$traits}`, cannot be implemented for {$problematic_kind} `{$self_ty}`
521521
.note = a trait object implements `{$traits}` if and only if `{$traits}` is one of the trait object's trait bounds
522522
523523
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
@@ -1349,7 +1349,7 @@ pub(crate) struct ImplForTyRequires {
13491349
}
13501350

13511351
#[derive(Diagnostic)]
1352-
#[diag(hir_analysis_traits_with_defualt_impl, code = E0321)]
1352+
#[diag(hir_analysis_traits_with_default_impl, code = E0321)]
13531353
#[note]
13541354
pub(crate) struct TraitsWithDefaultImpl<'a> {
13551355
#[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
@@ -1807,7 +1807,7 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
18071807
..
18081808
} = rib.kind
18091809
{
1810-
Some(errors::ElidedAnonymousLivetimeReportErrorSuggestion {
1810+
Some(errors::ElidedAnonymousLifetimeReportErrorSuggestion {
18111811
lo: span.shrink_to_lo(),
18121812
hi: lifetime.ident.span.shrink_to_hi(),
18131813
})
@@ -1831,18 +1831,18 @@ impl<'a, 'ast, 'ra: 'ast, 'tcx> LateResolutionVisitor<'a, 'ast, 'ra, 'tcx> {
18311831
ty: ty.span,
18321832
});
18331833
} else {
1834-
self.r.dcx().emit_err(errors::AnonymousLivetimeNonGatReportError {
1834+
self.r.dcx().emit_err(errors::AnonymousLifetimeNonGatReportError {
18351835
lifetime: lifetime.ident.span,
18361836
});
18371837
}
18381838
} else {
1839-
self.r.dcx().emit_err(errors::ElidedAnonymousLivetimeReportError {
1839+
self.r.dcx().emit_err(errors::ElidedAnonymousLifetimeReportError {
18401840
span: lifetime.ident.span,
18411841
suggestion,
18421842
});
18431843
}
18441844
} else {
1845-
self.r.dcx().emit_err(errors::ExplicitAnonymousLivetimeReportError {
1845+
self.r.dcx().emit_err(errors::ExplicitAnonymousLifetimeReportError {
18461846
span: lifetime.ident.span,
18471847
});
18481848
};

compiler/rustc_session/src/session.rs

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

compiler/rustc_span/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ impl FileName {
425425
}
426426
}
427427

428-
pub fn prefer_remapped_unconditionaly(&self) -> FileNameDisplay<'_> {
428+
pub fn prefer_remapped_unconditionally(&self) -> FileNameDisplay<'_> {
429429
FileNameDisplay { inner: self, display_pref: FileNameDisplayPreference::Remapped }
430430
}
431431

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
@@ -808,7 +808,7 @@ impl ScrapedDocTest {
808808
item_path.push(' ');
809809
}
810810
let name =
811-
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionaly());
811+
format!("{} - {item_path}(line {line})", filename.prefer_remapped_unconditionally());
812812

813813
Self { filename, line, langstr, text, name }
814814
}

0 commit comments

Comments
 (0)