Rollup merge of #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](https://github.com/rust-lang/rust/issues/129874) tracking all PRs with typos fixes)
This commit is contained in:
commit
929b308579
@ -14,7 +14,7 @@ pub(super) fn mangle<'tcx>(
|
||||
) -> String {
|
||||
// The symbol of a generic function may be scattered in multiple downstream dylibs.
|
||||
// If the symbol of a generic function still contains `crate name`, hash conflicts between the
|
||||
// generic funcion and other symbols of the same `crate` cannot be detected in time during
|
||||
// generic function and other symbols of the same `crate` cannot be detected in time during
|
||||
// construction. This symbol conflict is left over until it occurs during run time.
|
||||
// In this case, `instantiating-crate name` is used to replace `crate name` can completely
|
||||
// eliminate the risk of the preceding potential hash conflict.
|
||||
|
@ -26,7 +26,7 @@ fn classify_ret_ty<'a, Ty, C>(arg: &mut ArgAbi<'_, Ty>)
|
||||
// so defer to `classify_arg_ty`.
|
||||
let mut arg_gprs_left = NUM_RET_GPRS;
|
||||
classify_arg_ty(arg, &mut arg_gprs_left, MAX_RET_IN_REGS_SIZE);
|
||||
// Ret args cannot be passed via stack, we lower to indirect and let the backend handle the invisble reference
|
||||
// Ret args cannot be passed via stack, we lower to indirect and let the backend handle the invisible reference
|
||||
match arg.mode {
|
||||
super::PassMode::Indirect { attrs: _, meta_attrs: _, ref mut on_stack } => {
|
||||
*on_stack = false;
|
||||
|
@ -29,7 +29,7 @@ pub fn opts() -> TargetOptions {
|
||||
// they bring in.
|
||||
//
|
||||
// See also https://learn.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-170#lib
|
||||
// for documention on including library dependencies in C/C++ code.
|
||||
// for documentation on including library dependencies in C/C++ code.
|
||||
no_default_libraries: false,
|
||||
has_thread_local: true,
|
||||
|
||||
|
@ -2149,7 +2149,7 @@ pub struct TargetOptions {
|
||||
pub is_like_aix: bool,
|
||||
/// Whether the target toolchain is like macOS's. Only useful for compiling against iOS/macOS,
|
||||
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
|
||||
/// Also indiates whether to use Apple-specific ABI changes, such as extending function
|
||||
/// Also indicates whether to use Apple-specific ABI changes, such as extending function
|
||||
/// parameters to 32-bits.
|
||||
pub is_like_osx: bool,
|
||||
/// Whether the target toolchain is like Solaris's.
|
||||
|
@ -53,7 +53,7 @@ pub fn target() -> Target {
|
||||
options.entry_name = "__main_void".into();
|
||||
|
||||
// Default to PIC unlike base wasm. This makes precompiled objects such as
|
||||
// the standard library more suitable to be used with shared libaries a la
|
||||
// the standard library more suitable to be used with shared libraries a la
|
||||
// emscripten's dynamic linking convention.
|
||||
options.relocation_model = RelocModel::Pic;
|
||||
|
||||
|
@ -170,7 +170,7 @@ pub fn report_selection_error(
|
||||
{
|
||||
return guar;
|
||||
}
|
||||
// Silence redundant errors on binding acccess that are already
|
||||
// Silence redundant errors on binding access that are already
|
||||
// reported on the binding definition (#56607).
|
||||
if let Err(guar) = self.fn_arg_obligation(&obligation) {
|
||||
return guar;
|
||||
@ -898,7 +898,7 @@ fn visit_expr(&mut self, ex: &'v hir::Expr<'v>) -> Self::Result {
|
||||
let mut suggested = false;
|
||||
let mut chain = vec![];
|
||||
|
||||
// The following logic is simlar to `point_at_chain`, but that's focused on associated types
|
||||
// The following logic is similar to `point_at_chain`, but that's focused on associated types
|
||||
let mut expr = expr;
|
||||
while let hir::ExprKind::MethodCall(path_segment, rcvr_expr, args, span) = expr.kind {
|
||||
// Point at every method call in the chain with the `Result` type.
|
||||
|
@ -878,7 +878,7 @@ fn verify(&self, tcx: TyCtxt<'tcx>, item_def_id: DefId) -> Result<(), ErrorGuara
|
||||
}
|
||||
}
|
||||
// we cannot return errors from processing the format string as hard error here
|
||||
// as the diagnostic namespace gurantees that malformed input cannot cause an error
|
||||
// as the diagnostic namespace guarantees that malformed input cannot cause an error
|
||||
//
|
||||
// if we encounter any error while processing we nevertheless want to show it as warning
|
||||
// so that users are aware that something is not correct
|
||||
@ -986,10 +986,10 @@ pub fn format(
|
||||
})
|
||||
.collect();
|
||||
// we cannot return errors from processing the format string as hard error here
|
||||
// as the diagnostic namespace gurantees that malformed input cannot cause an error
|
||||
// as the diagnostic namespace guarantees that malformed input cannot cause an error
|
||||
//
|
||||
// if we encounter any error while processing the format string
|
||||
// we don't want to show the potentially half assembled formated string,
|
||||
// we don't want to show the potentially half assembled formatted string,
|
||||
// therefore we fall back to just showing the input string in this case
|
||||
//
|
||||
// The actual parser errors are emitted earlier
|
||||
|
@ -4663,7 +4663,7 @@ pub(super) fn suggest_add_result_as_return_type(
|
||||
// because this suggest adding both return type in
|
||||
// the `FnSig` and a default return value in the body, so it
|
||||
// is not suitable for foreign function without a local body,
|
||||
// and neighter for trait method which may be also implemented
|
||||
// and neither for trait method which may be also implemented
|
||||
// in other place, so shouldn't change it's FnSig.
|
||||
fn choose_suggest_items<'tcx, 'hir>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
|
@ -723,7 +723,7 @@ fn visit_goal(&mut self, goal: &InspectGoal<'_, 'tcx>) {
|
||||
// FIXME: While this matches the behavior of the
|
||||
// old solver, it is not the only way in which the unknowable
|
||||
// candidates *weaken* coherence, they can also force otherwise
|
||||
// sucessful normalization to be ambiguous.
|
||||
// successful normalization to be ambiguous.
|
||||
Ok(Certainty::Maybe(_) | Certainty::Yes) => {
|
||||
ambiguity_cause = None;
|
||||
break;
|
||||
|
@ -472,7 +472,7 @@ fn process_obligation(
|
||||
};
|
||||
|
||||
match infcx.at(&obligation.cause, obligation.param_env).eq(
|
||||
// Only really excercised by generic_const_exprs
|
||||
// Only really exercised by generic_const_exprs
|
||||
DefineOpaqueTypes::Yes,
|
||||
ct_ty,
|
||||
ty,
|
||||
|
@ -991,7 +991,7 @@ fn evaluate_predicate_recursively<'o>(
|
||||
};
|
||||
|
||||
match self.infcx.at(&obligation.cause, obligation.param_env).eq(
|
||||
// Only really excercised by generic_const_exprs
|
||||
// Only really exercised by generic_const_exprs
|
||||
DefineOpaqueTypes::Yes,
|
||||
ct_ty,
|
||||
ty,
|
||||
|
@ -242,7 +242,7 @@ fn answer_memo(
|
||||
// }
|
||||
// ...if `refs_answer` was computed lazily. The below early
|
||||
// returns can be deleted without impacting the correctness of
|
||||
// the algoritm; only its performance.
|
||||
// the algorithm; only its performance.
|
||||
debug!(?bytes_answer);
|
||||
match bytes_answer {
|
||||
Answer::No(_) if !self.assume.validity => return bytes_answer,
|
||||
|
@ -776,7 +776,7 @@ fn region_param_out_of_range(&self, ebr: I::EarlyParamRegion, r: I::Region) -> !
|
||||
}
|
||||
|
||||
/// It is sometimes necessary to adjust the De Bruijn indices during instantiation. This occurs
|
||||
/// when we are instantating a type with escaping bound vars into a context where we have
|
||||
/// when we are instantiating a type with escaping bound vars into a context where we have
|
||||
/// passed through binders. That's quite a mouthful. Let's see an example:
|
||||
///
|
||||
/// ```
|
||||
|
@ -162,7 +162,7 @@ fn fn_sig(self, interner: I) -> ty::Binder<I, ty::FnSig<I>> {
|
||||
|
||||
/// Returns `true` when the outermost type cannot be further normalized,
|
||||
/// resolved, or instantiated. This includes all primitive types, but also
|
||||
/// things like ADTs and trait objects, sice even if their arguments or
|
||||
/// things like ADTs and trait objects, since even if their arguments or
|
||||
/// nested types may be further simplified, the outermost [`ty::TyKind`] or
|
||||
/// type constructor remains the same.
|
||||
fn is_known_rigid(self) -> bool {
|
||||
|
@ -550,7 +550,7 @@ pub fn structurally_relate_tys<I: Interner, R: TypeRelation<I>>(
|
||||
/// Any semantic equality, e.g. of unevaluated consts, and inference variables have
|
||||
/// to be handled by the caller.
|
||||
///
|
||||
/// FIXME: This is not totally structual, which probably should be fixed.
|
||||
/// FIXME: This is not totally structural, which probably should be fixed.
|
||||
/// See the HACKs below.
|
||||
pub fn structurally_relate_consts<I: Interner, R: TypeRelation<I>>(
|
||||
relation: &mut R,
|
||||
|
@ -132,7 +132,7 @@ pub enum GoalSource {
|
||||
/// results in better error messages by avoiding spurious errors.
|
||||
/// We do not erase overflow constraints in `normalizes-to` goals unless
|
||||
/// they are from an impl where-clause. This is necessary due to
|
||||
/// backwards compatability, cc trait-system-refactor-initiatitive#70.
|
||||
/// backwards compatibility, cc trait-system-refactor-initiatitive#70.
|
||||
ImplWhereBound,
|
||||
/// Instantiating a higher-ranked goal and re-proving it.
|
||||
InstantiateHigherRanked,
|
||||
|
@ -70,7 +70,7 @@ pub struct TyAndLayout {
|
||||
/// The layout of a type in memory.
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize)]
|
||||
pub struct LayoutShape {
|
||||
/// The fields location withing the layout
|
||||
/// The fields location within the layout
|
||||
pub fields: FieldsShape,
|
||||
|
||||
/// Encodes information about multi-variant layouts.
|
||||
|
@ -267,7 +267,7 @@ pub fn get_filename(&self) -> Filename {
|
||||
with(|c| c.get_filename(self))
|
||||
}
|
||||
|
||||
/// Return lines that corespond to this `Span`
|
||||
/// Return lines that correspond to this `Span`
|
||||
pub fn get_lines(&self) -> LineInfo {
|
||||
with(|c| c.get_lines(self))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user