Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5780c1c

Browse files
committed
chore: Fix typos in 'compiler' (batch 3)
1 parent 78d5c04 commit 5780c1c

File tree

18 files changed

+21
-21
lines changed

18 files changed

+21
-21
lines changed

compiler/rustc_symbol_mangling/src/hashed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(super) fn mangle<'tcx>(
1414
) -> String {
1515
// The symbol of a generic function may be scattered in multiple downstream dylibs.
1616
// If the symbol of a generic function still contains `crate name`, hash conflicts between the
17-
// generic funcion and other symbols of the same `crate` cannot be detected in time during
17+
// generic function and other symbols of the same `crate` cannot be detected in time during
1818
// construction. This symbol conflict is left over until it occurs during run time.
1919
// In this case, `instantiating-crate name` is used to replace `crate name` can completely
2020
// eliminate the risk of the preceding potential hash conflict.

compiler/rustc_target/src/abi/call/xtensa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ where
2626
// so defer to `classify_arg_ty`.
2727
let mut arg_gprs_left = NUM_RET_GPRS;
2828
classify_arg_ty(arg, &mut arg_gprs_left, MAX_RET_IN_REGS_SIZE);
29-
// Ret args cannot be passed via stack, we lower to indirect and let the backend handle the invisble reference
29+
// Ret args cannot be passed via stack, we lower to indirect and let the backend handle the invisible reference
3030
match arg.mode {
3131
super::PassMode::Indirect { attrs: _, meta_attrs: _, ref mut on_stack } => {
3232
*on_stack = false;

compiler/rustc_target/src/spec/base/windows_msvc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub fn opts() -> TargetOptions {
2929
// they bring in.
3030
//
3131
// See also https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-170#lib
32-
// for documention on including library dependencies in C/C++ code.
32+
// for documentation on including library dependencies in C/C++ code.
3333
no_default_libraries: false,
3434
has_thread_local: true,
3535

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ pub struct TargetOptions {
21482148
pub is_like_aix: bool,
21492149
/// Whether the target toolchain is like macOS's. Only useful for compiling against iOS/macOS,
21502150
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
2151-
/// Also indiates whether to use Apple-specific ABI changes, such as extending function
2151+
/// Also indicates whether to use Apple-specific ABI changes, such as extending function
21522152
/// parameters to 32-bits.
21532153
pub is_like_osx: bool,
21542154
/// Whether the target toolchain is like Solaris's.

compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn target() -> Target {
5353
options.entry_name = "__main_void".into();
5454

5555
// Default to PIC unlike base wasm. This makes precompiled objects such as
56-
// the standard library more suitable to be used with shared libaries a la
56+
// the standard library more suitable to be used with shared libraries a la
5757
// emscripten's dynamic linking convention.
5858
options.relocation_model = RelocModel::Pic;
5959

compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
170170
{
171171
return guar;
172172
}
173-
// Silence redundant errors on binding acccess that are already
173+
// Silence redundant errors on binding access that are already
174174
// reported on the binding definition (#56607).
175175
if let Err(guar) = self.fn_arg_obligation(&obligation) {
176176
return guar;
@@ -900,7 +900,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
900900
let mut suggested = false;
901901
let mut chain = vec![];
902902

903-
// The following logic is simlar to `point_at_chain`, but that's focused on associated types
903+
// The following logic is similar to `point_at_chain`, but that's focused on associated types
904904
let mut expr = expr;
905905
while let hir::ExprKind::MethodCall(path_segment, rcvr_expr, args, span) = expr.kind {
906906
// Point at every method call in the chain with the `Result` type.

compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ impl<'tcx> OnUnimplementedFormatString {
878878
}
879879
}
880880
// we cannot return errors from processing the format string as hard error here
881-
// as the diagnostic namespace gurantees that malformed input cannot cause an error
881+
// as the diagnostic namespace guarantees that malformed input cannot cause an error
882882
//
883883
// if we encounter any error while processing we nevertheless want to show it as warning
884884
// so that users are aware that something is not correct
@@ -986,10 +986,10 @@ impl<'tcx> OnUnimplementedFormatString {
986986
})
987987
.collect();
988988
// we cannot return errors from processing the format string as hard error here
989-
// as the diagnostic namespace gurantees that malformed input cannot cause an error
989+
// as the diagnostic namespace guarantees that malformed input cannot cause an error
990990
//
991991
// if we encounter any error while processing the format string
992-
// we don't want to show the potentially half assembled formated string,
992+
// we don't want to show the potentially half assembled formatted string,
993993
// therefore we fall back to just showing the input string in this case
994994
//
995995
// The actual parser errors are emitted earlier

compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4663,7 +4663,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
46634663
// because this suggest adding both return type in
46644664
// the `FnSig` and a default return value in the body, so it
46654665
// is not suitable for foreign function without a local body,
4666-
// and neighter for trait method which may be also implemented
4666+
// and neither for trait method which may be also implemented
46674667
// in other place, so shouldn't change it's FnSig.
46684668
fn choose_suggest_items<'tcx, 'hir>(
46694669
tcx: TyCtxt<'tcx>,

compiler/rustc_trait_selection/src/traits/coherence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ impl<'a, 'tcx> ProofTreeVisitor<'tcx> for AmbiguityCausesVisitor<'a, 'tcx> {
723723
// FIXME: While this matches the behavior of the
724724
// old solver, it is not the only way in which the unknowable
725725
// candidates *weaken* coherence, they can also force otherwise
726-
// sucessful normalization to be ambiguous.
726+
// successful normalization to be ambiguous.
727727
Ok(Certainty::Maybe(_) | Certainty::Yes) => {
728728
ambiguity_cause = None;
729729
break;

compiler/rustc_trait_selection/src/traits/fulfill.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl<'a, 'tcx> ObligationProcessor for FulfillProcessor<'a, 'tcx> {
472472
};
473473

474474
match infcx.at(&obligation.cause, obligation.param_env).eq(
475-
// Only really excercised by generic_const_exprs
475+
// Only really exercised by generic_const_exprs
476476
DefineOpaqueTypes::Yes,
477477
ct_ty,
478478
ty,

0 commit comments

Comments
 (0)