Skip to content

Commit 0187e22

Browse files
authored
Unrolled build for rust-lang#129878
Rollup merge of rust-lang#129878 - Sajjon:sajjon_fix_typos_batch_3, r=jieyouxu chore: Fix typos in 'compiler' (batch 3) Batch 3/3: Fixes typos in `compiler` (See [issue](rust-lang#129874) tracking all PRs with typos fixes)
2 parents bd53aa3 + 5780c1c commit 0187e22

File tree

18 files changed

+21
-21
lines changed

18 files changed

+21
-21
lines changed

Diff for: compiler/rustc_symbol_mangling/src/hashed.rs

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

Diff for: compiler/rustc_target/src/abi/call/xtensa.rs

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

Diff for: compiler/rustc_target/src/spec/base/windows_msvc.rs

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

Diff for: compiler/rustc_target/src/spec/mod.rs

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

Diff for: compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs

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

Diff for: compiler/rustc_trait_selection/src/error_reporting/traits/fulfillment_errors.rs

+2-2
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;
@@ -898,7 +898,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
898898
let mut suggested = false;
899899
let mut chain = vec![];
900900

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

Diff for: compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs

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

Diff for: compiler/rustc_trait_selection/src/error_reporting/traits/suggestions.rs

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

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

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

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

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

Diff for: compiler/rustc_trait_selection/src/traits/select/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
991991
};
992992

993993
match self.infcx.at(&obligation.cause, obligation.param_env).eq(
994-
// Only really excercised by generic_const_exprs
994+
// Only really exercised by generic_const_exprs
995995
DefineOpaqueTypes::Yes,
996996
ct_ty,
997997
ty,

Diff for: compiler/rustc_transmute/src/maybe_transmutable/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ where
242242
// }
243243
// ...if `refs_answer` was computed lazily. The below early
244244
// returns can be deleted without impacting the correctness of
245-
// the algoritm; only its performance.
245+
// the algorithm; only its performance.
246246
debug!(?bytes_answer);
247247
match bytes_answer {
248248
Answer::No(_) if !self.assume.validity => return bytes_answer,

Diff for: compiler/rustc_type_ir/src/binder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ impl<'a, I: Interner> ArgFolder<'a, I> {
776776
}
777777

778778
/// It is sometimes necessary to adjust the De Bruijn indices during instantiation. This occurs
779-
/// when we are instantating a type with escaping bound vars into a context where we have
779+
/// when we are instantiating a type with escaping bound vars into a context where we have
780780
/// passed through binders. That's quite a mouthful. Let's see an example:
781781
///
782782
/// ```

Diff for: compiler/rustc_type_ir/src/inherent.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub trait Ty<I: Interner<Ty = Self>>:
162162

163163
/// Returns `true` when the outermost type cannot be further normalized,
164164
/// resolved, or instantiated. This includes all primitive types, but also
165-
/// things like ADTs and trait objects, sice even if their arguments or
165+
/// things like ADTs and trait objects, since even if their arguments or
166166
/// nested types may be further simplified, the outermost [`ty::TyKind`] or
167167
/// type constructor remains the same.
168168
fn is_known_rigid(self) -> bool {

Diff for: compiler/rustc_type_ir/src/relate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ pub fn structurally_relate_tys<I: Interner, R: TypeRelation<I>>(
550550
/// Any semantic equality, e.g. of unevaluated consts, and inference variables have
551551
/// to be handled by the caller.
552552
///
553-
/// FIXME: This is not totally structual, which probably should be fixed.
553+
/// FIXME: This is not totally structural, which probably should be fixed.
554554
/// See the HACKs below.
555555
pub fn structurally_relate_consts<I: Interner, R: TypeRelation<I>>(
556556
relation: &mut R,

Diff for: compiler/rustc_type_ir/src/solve/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub enum GoalSource {
132132
/// results in better error messages by avoiding spurious errors.
133133
/// We do not erase overflow constraints in `normalizes-to` goals unless
134134
/// they are from an impl where-clause. This is necessary due to
135-
/// backwards compatability, cc trait-system-refactor-initiatitive#70.
135+
/// backwards compatibility, cc trait-system-refactor-initiatitive#70.
136136
ImplWhereBound,
137137
/// Instantiating a higher-ranked goal and re-proving it.
138138
InstantiateHigherRanked,

Diff for: compiler/stable_mir/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub struct TyAndLayout {
7070
/// The layout of a type in memory.
7171
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize)]
7272
pub struct LayoutShape {
73-
/// The fields location withing the layout
73+
/// The fields location within the layout
7474
pub fields: FieldsShape,
7575

7676
/// Encodes information about multi-variant layouts.

Diff for: compiler/stable_mir/src/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ impl Span {
267267
with(|c| c.get_filename(self))
268268
}
269269

270-
/// Return lines that corespond to this `Span`
270+
/// Return lines that correspond to this `Span`
271271
pub fn get_lines(&self) -> LineInfo {
272272
with(|c| c.get_lines(self))
273273
}

0 commit comments

Comments
 (0)