Rollup merge of #134006 - klensy:typos, r=nnethercote
setup typos check in CI This allows to check typos in CI, currently for compiler only (to reduce commit size with fixes). With current setup, exclude list is quite short, so it worth trying? Also includes commits with actual typo fixes. MCP: https://github.com/rust-lang/compiler-team/issues/817 typos check currently turned for: * ./compiler * ./library * ./src/bootstrap * ./src/librustdoc After merging, PRs which enables checks for other crates (tools) can be implemented too. Found typos will **not break** other jobs immediately: (tests, building compiler for perf run). Job will be marked as red on completion in ~ 20 secs, so you will not forget to fix it whenever you want, before merging pr. Check typos: `python x.py test tidy --extra-checks=spellcheck` Apply typo fixes: `python x.py test tidy --extra-checks=spellcheck:fix` (in case if there only 1 suggestion of each typo) Current fail in this pr is expected and shows how typo errors emitted. Commit with error will be removed after r+.
This commit is contained in:
@@ -4432,7 +4432,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
||||
candidate_impls: &[ImplCandidate<'tcx>],
|
||||
span: Span,
|
||||
) {
|
||||
// We can only suggest the slice coersion for function and binary operation arguments,
|
||||
// We can only suggest the slice coercion for function and binary operation arguments,
|
||||
// since the suggestion would make no sense in turbofish or call
|
||||
let (ObligationCauseCode::BinOp { .. } | ObligationCauseCode::FunctionArg { .. }) =
|
||||
obligation.cause.code()
|
||||
|
||||
@@ -643,7 +643,7 @@ impl Subdiagnostic for AddLifetimeParamsSuggestion<'_> {
|
||||
// Do not suggest constraining the `&self` param, but rather the return type.
|
||||
// If that is wrong (because it is not sufficient), a follow up error will tell the
|
||||
// user to fix it. This way we lower the chances of *over* constraining, but still
|
||||
// get the cake of "correctly" contrained in two steps.
|
||||
// get the cake of "correctly" constrained in two steps.
|
||||
visitor.visit_ty_unambig(self.ty_sup);
|
||||
}
|
||||
visitor.visit_ty_unambig(self.ty_sub);
|
||||
|
||||
@@ -31,7 +31,7 @@ use crate::traits::{
|
||||
///
|
||||
/// Currently that is `Self` in supertraits. This is needed
|
||||
/// because `dyn_compatibility_violations` can't be used during
|
||||
/// type collection, as type collection is needed for `dyn_compatiblity_violations` itself.
|
||||
/// type collection, as type collection is needed for `dyn_compatibility_violations` itself.
|
||||
#[instrument(level = "debug", skip(tcx), ret)]
|
||||
pub fn hir_ty_lowering_dyn_compatibility_violations(
|
||||
tcx: TyCtxt<'_>,
|
||||
|
||||
@@ -62,7 +62,7 @@ pub fn evaluate_host_effect_obligation<'tcx>(
|
||||
Err(EvaluationFailure::NoSolution) => {}
|
||||
}
|
||||
|
||||
match evaluate_host_effect_from_selection_candiate(selcx, obligation) {
|
||||
match evaluate_host_effect_from_selection_candidate(selcx, obligation) {
|
||||
Ok(result) => return Ok(result),
|
||||
Err(EvaluationFailure::Ambiguous) => return Err(EvaluationFailure::Ambiguous),
|
||||
Err(EvaluationFailure::NoSolution) => {}
|
||||
@@ -398,7 +398,7 @@ fn evaluate_host_effect_for_destruct_goal<'tcx>(
|
||||
.collect())
|
||||
}
|
||||
|
||||
fn evaluate_host_effect_from_selection_candiate<'tcx>(
|
||||
fn evaluate_host_effect_from_selection_candidate<'tcx>(
|
||||
selcx: &mut SelectionContext<'_, 'tcx>,
|
||||
obligation: &HostEffectObligation<'tcx>,
|
||||
) -> Result<ThinVec<PredicateObligation<'tcx>>, EvaluationFailure> {
|
||||
|
||||
@@ -481,7 +481,7 @@ pub enum EvaluateConstErr {
|
||||
/// some unevaluated constant with either generic parameters or inference variables in its
|
||||
/// generic arguments.
|
||||
HasGenericsOrInfers,
|
||||
/// The type this constant evalauted to is not valid for use in const generics. This should
|
||||
/// The type this constant evaluated to is not valid for use in const generics. This should
|
||||
/// always result in an error when checking the constant is correctly typed for the parameter
|
||||
/// it is an argument to, so a bug is delayed when encountering this.
|
||||
InvalidConstParamTy(ErrorGuaranteed),
|
||||
|
||||
@@ -904,7 +904,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
|
||||
let goal_kind =
|
||||
self.tcx().async_fn_trait_kind_from_def_id(obligation.predicate.def_id()).unwrap();
|
||||
|
||||
// If we have not yet determiend the `ClosureKind` of the closure or coroutine-closure,
|
||||
// If we have not yet determined the `ClosureKind` of the closure or coroutine-closure,
|
||||
// then additionally register an `AsyncFnKindHelper` goal which will fail if the kind
|
||||
// is constrained to an insufficient type later on.
|
||||
if let Some(closure_kind) = self.infcx.shallow_resolve(kind_ty).to_opt_closure_kind() {
|
||||
|
||||
Reference in New Issue
Block a user