chore: remove duplicate words
This commit is contained in:
parent
c3774be741
commit
ada9fda7c3
23 changed files with 26 additions and 26 deletions
|
@ -403,7 +403,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
//
|
||||
// Why only in unoptimized builds?
|
||||
// - In unoptimized builds LLVM uses FastISel which does not support switches, so it
|
||||
// must fall back to the to the slower SelectionDAG isel. Therefore, using `br` gives
|
||||
// must fall back to the slower SelectionDAG isel. Therefore, using `br` gives
|
||||
// significant compile time speedups for unoptimized builds.
|
||||
// - In optimized builds the above doesn't hold, and using `br` sometimes results in
|
||||
// worse generated code because LLVM can no longer tell that the value being switched
|
||||
|
|
|
@ -245,7 +245,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
|
|||
// The tag of a `Single` enum is like the tag of the niched
|
||||
// variant: there's no tag as the discriminant is encoded
|
||||
// entirely implicitly. If `write_discriminant` ever hits this
|
||||
// case, we do a "validation read" to ensure the the right
|
||||
// case, we do a "validation read" to ensure the right
|
||||
// discriminant is encoded implicitly, so any attempt to write
|
||||
// the wrong discriminant for a `Single` enum will reliably
|
||||
// result in UB.
|
||||
|
|
|
@ -499,7 +499,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
// If the shadowed binding has an an itializer expression,
|
||||
// If the shadowed binding has an itializer expression,
|
||||
// use the initializer expression'ty to try to find the method again.
|
||||
// For example like: `let mut x = Vec::new();`,
|
||||
// `Vec::new()` is the itializer expression.
|
||||
|
@ -968,7 +968,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
}
|
||||
|
||||
// Make sure that, if any traits other than the found ones were involved,
|
||||
// we don't don't report an unimplemented trait.
|
||||
// we don't report an unimplemented trait.
|
||||
// We don't want to say that `iter::Cloned` is not an iterator, just
|
||||
// because of some non-Clone item being iterated over.
|
||||
for (predicate, _parent_pred, _cause) in unsatisfied_predicates {
|
||||
|
|
|
@ -237,7 +237,7 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
|
||||
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
|
||||
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
|
||||
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
|
||||
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
|
||||
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
|
||||
/// list are being applied to the same root variable.
|
||||
pub fn is_ancestor_or_same_capture(
|
||||
|
|
|
@ -130,7 +130,7 @@ fn convert_to_hir_projections_and_truncate_for_capture(
|
|||
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
|
||||
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
|
||||
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
|
||||
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
|
||||
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
|
||||
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
|
||||
/// list are being applied to the same root variable.
|
||||
fn is_ancestor_or_same_capture(
|
||||
|
|
|
@ -138,7 +138,7 @@ impl<'tcx> ConstToPat<'tcx> {
|
|||
// lints, but no errors), double-check that all types in the const implement
|
||||
// `PartialEq`. Even if we have a valtree, we may have found something
|
||||
// in there with non-structural-equality, meaning we match using `PartialEq`
|
||||
// and we hence have to check that that impl exists.
|
||||
// and we hence have to check if that impl exists.
|
||||
// This is all messy but not worth cleaning up: at some point we'll emit
|
||||
// a hard error when we don't have a valtree or when we find something in
|
||||
// the valtree that is not structural; then this can all be made a lot simpler.
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//! `Value` is interned as a `VnIndex`, which allows us to cheaply compute identical values.
|
||||
//!
|
||||
//! From those assignments, we construct a mapping `VnIndex -> Vec<(Local, Location)>` of available
|
||||
//! values, the locals in which they are stored, and a the assignment location.
|
||||
//! values, the locals in which they are stored, and the assignment location.
|
||||
//!
|
||||
//! In a second pass, we traverse all (non SSA) assignments `x = rvalue` and operands. For each
|
||||
//! one, we compute the `VnIndex` of the rvalue. If this `VnIndex` is associated to a constant, we
|
||||
|
|
|
@ -519,7 +519,7 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
|||
&add_subtyping_projections::Subtyper, // calling this after reveal_all ensures that we don't deal with opaque types
|
||||
&elaborate_drops::ElaborateDrops,
|
||||
// This will remove extraneous landing pads which are no longer
|
||||
// necessary as well as well as forcing any call in a non-unwinding
|
||||
// necessary as well as forcing any call in a non-unwinding
|
||||
// function calling a possibly-unwinding function to abort the process.
|
||||
&abort_unwinding_calls::AbortUnwindingCalls,
|
||||
// AddMovesForPackedDrops needs to run after drop
|
||||
|
|
|
@ -816,7 +816,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
|
|||
mut func, mut args, call_source: desugar, fn_span, ..
|
||||
} => {
|
||||
// This promoted involves a function call, so it may fail to evaluate.
|
||||
// Let's make sure it is added to `required_consts` so that that failure cannot get lost.
|
||||
// Let's make sure it is added to `required_consts` so that failure cannot get lost.
|
||||
self.add_to_required = true;
|
||||
|
||||
self.visit_operand(&mut func, loc);
|
||||
|
|
|
@ -102,7 +102,7 @@ fn ty_ref_to_pub_struct(tcx: TyCtxt<'_>, ty: &hir::Ty<'_>) -> Publicness {
|
|||
Publicness::new(true, true)
|
||||
}
|
||||
|
||||
/// Determine if a work from the worklist is coming from the a `#[allow]`
|
||||
/// Determine if a work from the worklist is coming from a `#[allow]`
|
||||
/// or a `#[expect]` of `dead_code`
|
||||
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
|
||||
enum ComesFromAllowExpect {
|
||||
|
|
|
@ -155,7 +155,7 @@ impl FileEncoder {
|
|||
if std::intrinsics::unlikely(self.buffered > flush_threshold) {
|
||||
self.flush();
|
||||
}
|
||||
// SAFETY: We checked above that that N < self.buffer_empty().len(),
|
||||
// SAFETY: We checked above that N < self.buffer_empty().len(),
|
||||
// and if isn't, flush ensures that our empty buffer is now BUF_SIZE.
|
||||
// We produce a post-mono error if N > BUF_SIZE.
|
||||
let buf = unsafe { self.buffer_empty().first_chunk_mut::<N>().unwrap_unchecked() };
|
||||
|
|
|
@ -4114,7 +4114,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
expr = binding_expr;
|
||||
}
|
||||
if let hir::Node::Param(param) = parent {
|
||||
// ...and it is a an fn argument.
|
||||
// ...and it is an fn argument.
|
||||
let prev_ty = self.resolve_vars_if_possible(
|
||||
typeck_results
|
||||
.node_type_opt(param.hir_id)
|
||||
|
|
|
@ -1296,7 +1296,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
|
|||
expr = binding_expr;
|
||||
}
|
||||
if let hir::Node::Param(_param) = parent {
|
||||
// ...and it is a an fn argument.
|
||||
// ...and it is an fn argument.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue