Skip to content

Commit 7ee1d16

Browse files
authored
Unrolled build for rust-lang#127230
Rollup merge of rust-lang#127230 - hattizai:patch01, r=saethlin chore: remove duplicate words remove duplicate words in comments to improve readability.
2 parents 49ff390 + ada9fda commit 7ee1d16

File tree

23 files changed

+26
-26
lines changed

23 files changed

+26
-26
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
403403
//
404404
// Why only in unoptimized builds?
405405
// - In unoptimized builds LLVM uses FastISel which does not support switches, so it
406-
// must fall back to the to the slower SelectionDAG isel. Therefore, using `br` gives
406+
// must fall back to the slower SelectionDAG isel. Therefore, using `br` gives
407407
// significant compile time speedups for unoptimized builds.
408408
// - In optimized builds the above doesn't hold, and using `br` sometimes results in
409409
// worse generated code because LLVM can no longer tell that the value being switched

compiler/rustc_const_eval/src/interpret/discriminant.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
245245
// The tag of a `Single` enum is like the tag of the niched
246246
// variant: there's no tag as the discriminant is encoded
247247
// entirely implicitly. If `write_discriminant` ever hits this
248-
// case, we do a "validation read" to ensure the the right
248+
// case, we do a "validation read" to ensure the right
249249
// discriminant is encoded implicitly, so any attempt to write
250250
// the wrong discriminant for a `Single` enum will reliably
251251
// result in UB.

compiler/rustc_hir_typeck/src/method/suggest.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
499499
}
500500
}
501501

502-
// If the shadowed binding has an an itializer expression,
502+
// If the shadowed binding has an itializer expression,
503503
// use the initializer expression'ty to try to find the method again.
504504
// For example like: `let mut x = Vec::new();`,
505505
// `Vec::new()` is the itializer expression.
@@ -968,7 +968,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
968968
}
969969

970970
// Make sure that, if any traits other than the found ones were involved,
971-
// we don't don't report an unimplemented trait.
971+
// we don't report an unimplemented trait.
972972
// We don't want to say that `iter::Cloned` is not an iterator, just
973973
// because of some non-Clone item being iterated over.
974974
for (predicate, _parent_pred, _cause) in unsatisfied_predicates {

compiler/rustc_middle/src/ty/closure.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl<'tcx> TyCtxt<'tcx> {
237237
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
238238
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
239239
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
240-
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
240+
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
241241
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
242242
/// list are being applied to the same root variable.
243243
pub fn is_ancestor_or_same_capture(

compiler/rustc_mir_build/src/build/expr/as_place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn convert_to_hir_projections_and_truncate_for_capture(
130130
/// Eg: 1. `foo.x` which is represented using `projections=[Field(x)]` is an ancestor of
131131
/// `foo.x.y` which is represented using `projections=[Field(x), Field(y)]`.
132132
/// Note both `foo.x` and `foo.x.y` start off of the same root variable `foo`.
133-
/// 2. Since we only look at the projections here function will return `bar.x` as an a valid
133+
/// 2. Since we only look at the projections here function will return `bar.x` as a valid
134134
/// ancestor of `foo.x.y`. It's the caller's responsibility to ensure that both projections
135135
/// list are being applied to the same root variable.
136136
fn is_ancestor_or_same_capture(

compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl<'tcx> ConstToPat<'tcx> {
138138
// lints, but no errors), double-check that all types in the const implement
139139
// `PartialEq`. Even if we have a valtree, we may have found something
140140
// in there with non-structural-equality, meaning we match using `PartialEq`
141-
// and we hence have to check that that impl exists.
141+
// and we hence have to check if that impl exists.
142142
// This is all messy but not worth cleaning up: at some point we'll emit
143143
// a hard error when we don't have a valtree or when we find something in
144144
// the valtree that is not structural; then this can all be made a lot simpler.

compiler/rustc_mir_transform/src/gvn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! `Value` is interned as a `VnIndex`, which allows us to cheaply compute identical values.
99
//!
1010
//! From those assignments, we construct a mapping `VnIndex -> Vec<(Local, Location)>` of available
11-
//! values, the locals in which they are stored, and a the assignment location.
11+
//! values, the locals in which they are stored, and the assignment location.
1212
//!
1313
//! In a second pass, we traverse all (non SSA) assignments `x = rvalue` and operands. For each
1414
//! one, we compute the `VnIndex` of the rvalue. If this `VnIndex` is associated to a constant, we

compiler/rustc_mir_transform/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
519519
&add_subtyping_projections::Subtyper, // calling this after reveal_all ensures that we don't deal with opaque types
520520
&elaborate_drops::ElaborateDrops,
521521
// This will remove extraneous landing pads which are no longer
522-
// necessary as well as well as forcing any call in a non-unwinding
522+
// necessary as well as forcing any call in a non-unwinding
523523
// function calling a possibly-unwinding function to abort the process.
524524
&abort_unwinding_calls::AbortUnwindingCalls,
525525
// AddMovesForPackedDrops needs to run after drop

compiler/rustc_mir_transform/src/promote_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ impl<'a, 'tcx> Promoter<'a, 'tcx> {
816816
mut func, mut args, call_source: desugar, fn_span, ..
817817
} => {
818818
// This promoted involves a function call, so it may fail to evaluate.
819-
// Let's make sure it is added to `required_consts` so that that failure cannot get lost.
819+
// Let's make sure it is added to `required_consts` so that failure cannot get lost.
820820
self.add_to_required = true;
821821

822822
self.visit_operand(&mut func, loc);

compiler/rustc_passes/src/dead.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn ty_ref_to_pub_struct(tcx: TyCtxt<'_>, ty: &hir::Ty<'_>) -> Publicness {
102102
Publicness::new(true, true)
103103
}
104104

105-
/// Determine if a work from the worklist is coming from the a `#[allow]`
105+
/// Determine if a work from the worklist is coming from a `#[allow]`
106106
/// or a `#[expect]` of `dead_code`
107107
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
108108
enum ComesFromAllowExpect {

compiler/rustc_serialize/src/opaque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl FileEncoder {
155155
if std::intrinsics::unlikely(self.buffered > flush_threshold) {
156156
self.flush();
157157
}
158-
// SAFETY: We checked above that that N < self.buffer_empty().len(),
158+
// SAFETY: We checked above that N < self.buffer_empty().len(),
159159
// and if isn't, flush ensures that our empty buffer is now BUF_SIZE.
160160
// We produce a post-mono error if N > BUF_SIZE.
161161
let buf = unsafe { self.buffer_empty().first_chunk_mut::<N>().unwrap_unchecked() };

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4114,7 +4114,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
41144114
expr = binding_expr;
41154115
}
41164116
if let hir::Node::Param(param) = parent {
4117-
// ...and it is a an fn argument.
4117+
// ...and it is an fn argument.
41184118
let prev_ty = self.resolve_vars_if_possible(
41194119
typeck_results
41204120
.node_type_opt(param.hir_id)

compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
12961296
expr = binding_expr;
12971297
}
12981298
if let hir::Node::Param(_param) = parent {
1299-
// ...and it is a an fn argument.
1299+
// ...and it is an fn argument.
13001300
break;
13011301
}
13021302
}

library/core/src/clone.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ pub struct AssertParamIsCopy<T: Copy + ?Sized> {
230230
pub unsafe trait CloneToUninit {
231231
/// Performs copy-assignment from `self` to `dst`.
232232
///
233-
/// This is analogous to to `std::ptr::write(dst, self.clone())`,
233+
/// This is analogous to `std::ptr::write(dst, self.clone())`,
234234
/// except that `self` may be a dynamically-sized type ([`!Sized`](Sized)).
235235
///
236236
/// Before this function is called, `dst` may point to uninitialized memory.

library/core/src/iter/adapters/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub(crate) struct GenericShunt<'a, I, R> {
159159
residual: &'a mut Option<R>,
160160
}
161161

162-
/// Process the given iterator as if it yielded a the item's `Try::Output`
162+
/// Process the given iterator as if it yielded the item's `Try::Output`
163163
/// type instead. Any `Try::Residual`s encountered will stop the inner iterator
164164
/// and be propagated back to the overall result.
165165
pub(crate) fn try_process<I, T, R, F, U>(iter: I, mut f: F) -> ChangeOutputType<I::Item, U>

library/core/src/num/dec2flt/lemire.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn compute_product_approx(q: i64, w: u64, precision: usize) -> (u64, u64) {
157157
// Need to do a second multiplication to get better precision
158158
// for the lower product. This will always be exact
159159
// where q is < 55, since 5^55 < 2^128. If this wraps,
160-
// then we need to need to round up the hi product.
160+
// then we need to round up the hi product.
161161
let (_, second_hi) = full_multiplication(w, hi5);
162162
first_lo = first_lo.wrapping_add(second_hi);
163163
if second_hi > first_lo {

library/std/src/io/error/repr_bitpacked.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//!
2929
//! # Layout
3030
//! Tagged values are 64 bits, with the 2 least significant bits used for the
31-
//! tag. This means there are there are 4 "variants":
31+
//! tag. This means there are 4 "variants":
3232
//!
3333
//! - **Tag 0b00**: The first variant is equivalent to
3434
//! `ErrorData::SimpleMessage`, and holds a `&'static SimpleMessage` directly.

library/std/src/sys/pal/unix/args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ mod imp {
183183
// Use `_NSGetArgc` and `_NSGetArgv` on Apple platforms.
184184
//
185185
// Even though these have underscores in their names, they've been available
186-
// since since the first versions of both macOS and iOS, and are declared in
186+
// since the first versions of both macOS and iOS, and are declared in
187187
// the header `crt_externs.h`.
188188
//
189189
// NOTE: This header was added to the iOS 13.0 SDK, which has been the source

library/std/src/sys/pal/windows/alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ unsafe fn allocate(layout: Layout, zeroed: bool) -> *mut u8 {
190190
// it, it is safe to write a header directly before it.
191191
unsafe { ptr::write((aligned as *mut Header).sub(1), Header(ptr)) };
192192

193-
// SAFETY: The returned pointer does not point to the to the start of an allocated block,
193+
// SAFETY: The returned pointer does not point to the start of an allocated block,
194194
// but there is a header readable directly before it containing the location of the start
195195
// of the block.
196196
aligned

src/tools/clippy/clippy_lints/src/empty_with_brackets.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ declare_clippy_lint! {
1616
/// and it may be desirable to do so consistently for style.
1717
///
1818
/// However, removing the brackets also introduces a public constant named after the struct,
19-
/// so this is not just a syntactic simplification but an an API change, and adding them back
19+
/// so this is not just a syntactic simplification but an API change, and adding them back
2020
/// is a *breaking* API change.
2121
///
2222
/// ### Example
@@ -44,7 +44,7 @@ declare_clippy_lint! {
4444
/// and it may be desirable to do so consistently for style.
4545
///
4646
/// However, removing the brackets also introduces a public constant named after the variant,
47-
/// so this is not just a syntactic simplification but an an API change, and adding them back
47+
/// so this is not just a syntactic simplification but an API change, and adding them back
4848
/// is a *breaking* API change.
4949
///
5050
/// ### Example

src/tools/clippy/clippy_lints/src/non_copy_const.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ impl<'tcx> NonCopyConst<'tcx> {
258258
// e.g. implementing `has_frozen_variant` described above, and not running this function
259259
// when the type doesn't have any frozen variants would be the 'correct' way for the 2nd
260260
// case (that actually removes another suboptimal behavior (I won't say 'false positive') where,
261-
// similar to 2., but with the a frozen variant) (e.g. borrowing
261+
// similar to 2., but with a frozen variant) (e.g. borrowing
262262
// `borrow_interior_mutable_const::enums::AssocConsts::TO_BE_FROZEN_VARIANT`).
263263
// I chose this way because unfrozen enums as assoc consts are rare (or, hopefully, none).
264264
matches!(err, ErrorHandled::TooGeneric(..))

tests/ui/closures/2229_closure_analysis/migrations/precise_no_migrations.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Drop for ContainsAndImplsDrop {
4848
}
4949

5050
// If a path isn't directly captured but requires Drop, then this tests that migrations aren't
51-
// needed if the a parent to that path is captured.
51+
// needed if the parent to that path is captured.
5252
fn test_precise_analysis_parent_captured_1() {
5353
let t = ConstainsDropField(Foo(10), Foo(20));
5454

@@ -60,7 +60,7 @@ fn test_precise_analysis_parent_captured_1() {
6060
}
6161

6262
// If a path isn't directly captured but requires Drop, then this tests that migrations aren't
63-
// needed if the a parent to that path is captured.
63+
// needed if the parent to that path is captured.
6464
fn test_precise_analysis_parent_captured_2() {
6565
let t = ContainsAndImplsDrop(Foo(10));
6666

tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl<T, S> Trait<T> for i32 {
1111
type Assoc = String;
1212
}
1313

14-
// Should not not trigger suggestion here...
14+
// Should not trigger suggestion here...
1515
impl<T, S> Trait<T, S> for () {}
1616
//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
1717

0 commit comments

Comments
 (0)