Auto merge of #100707 - dzvon:fix-typo, r=davidtwco
Fix a bunch of typo This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
This commit is contained in:
commit
b32223fec1
140 changed files with 171 additions and 171 deletions
|
@ -101,7 +101,7 @@ pub(super) fn check_fn<'a, 'tcx>(
|
|||
decl.output.span(),
|
||||
param_env,
|
||||
));
|
||||
// If we replaced declared_ret_ty with infer vars, then we must be infering
|
||||
// If we replaced declared_ret_ty with infer vars, then we must be inferring
|
||||
// an opaque type, so set a flag so we can improve diagnostics.
|
||||
fcx.return_type_has_opaque = ret_ty != declared_ret_ty;
|
||||
|
||||
|
@ -1543,7 +1543,7 @@ fn detect_discriminant_duplicate<'tcx>(
|
|||
None => {
|
||||
// At this point we know this discriminant is a duplicate, and was not explicitly
|
||||
// assigned by the user. Here we iterate backwards to fetch the HIR for the last
|
||||
// explictly assigned discriminant, and letting the user know that this was the
|
||||
// explicitly assigned discriminant, and letting the user know that this was the
|
||||
// increment startpoint, and how many steps from there leading to the duplicate
|
||||
if let Some((n, hir::Variant { span, ident, .. })) =
|
||||
vs[..idx].iter().rev().enumerate().find(|v| v.1.disr_expr.is_some())
|
||||
|
@ -1566,7 +1566,7 @@ fn detect_discriminant_duplicate<'tcx>(
|
|||
};
|
||||
|
||||
// Here we loop through the discriminants, comparing each discriminant to another.
|
||||
// When a duplicate is detected, we instatiate an error and point to both
|
||||
// When a duplicate is detected, we instantiate an error and point to both
|
||||
// initial and duplicate value. The duplicate discriminant is then discarded by swapping
|
||||
// it with the last element and decrementing the `vec.len` (which is why we have to evaluate
|
||||
// `discrs.len()` anew every iteration, and why this could be tricky to do in a functional
|
||||
|
|
|
@ -153,7 +153,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
) {
|
||||
let tcx = self.tcx;
|
||||
|
||||
// Conceptually, we've got some number of expected inputs, and some number of provided aguments
|
||||
// Conceptually, we've got some number of expected inputs, and some number of provided arguments
|
||||
// and we can form a grid of whether each argument could satisfy a given input:
|
||||
// in1 | in2 | in3 | ...
|
||||
// arg1 ? | | |
|
||||
|
|
|
@ -497,7 +497,7 @@ impl<'a, 'tcx> ExprUseVisitor<'a, 'tcx> {
|
|||
let expr_place = return_if_err!(self.mc.cat_expr(expr));
|
||||
f(self);
|
||||
if let Some(els) = els {
|
||||
// borrowing because we need to test the descriminant
|
||||
// borrowing because we need to test the discriminant
|
||||
self.maybe_read_scrutinee(expr, expr_place.clone(), from_ref(pat).iter());
|
||||
self.walk_block(els)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue