Skip to content

Commit 190d139

Browse files
committed
Fix repeated word typos
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
1 parent c0bbc39 commit 190d139

File tree

17 files changed

+30
-30
lines changed

17 files changed

+30
-30
lines changed

src/doc/rustc/src/lints/listing/warn-by-default.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ warning: attempt to add with overflow
2424

2525
## dead-code
2626

27-
This lint detects detect unused, unexported items. Some
27+
This lint detects unused, unexported items. Some
2828
example code that triggers this lint:
2929

3030
```rust
@@ -44,7 +44,7 @@ warning: function is never used: `foo`
4444

4545
## deprecated
4646

47-
This lint detects detects use of deprecated items. Some
47+
This lint detects use of deprecated items. Some
4848
example code that triggers this lint:
4949

5050
```rust
@@ -119,7 +119,7 @@ warning: found struct without foreign-function-safe representation annotation in
119119

120120
## late-bound-lifetime-arguments
121121

122-
This lint detects detects generic lifetime arguments in path segments with
122+
This lint detects generic lifetime arguments in path segments with
123123
late bound lifetime parameters. Some example code that triggers this lint:
124124

125125
```rust
@@ -381,7 +381,7 @@ extern crate macro_crate_test;
381381

382382
## private-in-public
383383

384-
This lint detects detect private items in public interfaces not caught by the old implementation. Some
384+
This lint detects private items in public interfaces not caught by the old implementation. Some
385385
example code that triggers this lint:
386386

387387
```rust,ignore
@@ -659,7 +659,7 @@ warning: unknown lint: `not_a_real_lint`
659659

660660
## unreachable-code
661661

662-
This lint detects detects unreachable code paths. Some example code that
662+
This lint detects unreachable code paths. Some example code that
663663
triggers this lint:
664664

665665
```rust,no_run
@@ -681,7 +681,7 @@ warning: unreachable statement
681681

682682
## unreachable-patterns
683683

684-
This lint detects detects unreachable patterns. Some
684+
This lint detects unreachable patterns. Some
685685
example code that triggers this lint:
686686

687687
```rust
@@ -716,11 +716,11 @@ annotations now.
716716

717717
## unused-allocation
718718

719-
This lint detects detects unnecessary allocations that can be eliminated.
719+
This lint detects unnecessary allocations that can be eliminated.
720720

721721
## unused-assignments
722722

723-
This lint detects detect assignments that will never be read. Some
723+
This lint detects assignments that will never be read. Some
724724
example code that triggers this lint:
725725

726726
```rust
@@ -741,7 +741,7 @@ warning: value assigned to `x` is never read
741741

742742
## unused-attributes
743743

744-
This lint detects detects attributes that were not used by the compiler. Some
744+
This lint detects attributes that were not used by the compiler. Some
745745
example code that triggers this lint:
746746

747747
```rust
@@ -785,7 +785,7 @@ warning: comparison is useless due to type limits
785785

786786
## unused-doc-comment
787787

788-
This lint detects detects doc comments that aren't used by rustdoc. Some
788+
This lint detects doc comments that aren't used by rustdoc. Some
789789
example code that triggers this lint:
790790

791791
```rust
@@ -831,7 +831,7 @@ warning: unused import: `std::collections::HashMap`
831831

832832
## unused-macros
833833

834-
This lint detects detects macros that were not used. Some example code that
834+
This lint detects macros that were not used. Some example code that
835835
triggers this lint:
836836

837837
```rust
@@ -884,7 +884,7 @@ warning: unused `std::result::Result` that must be used
884884

885885
## unused-mut
886886

887-
This lint detects detect mut variables which don't need to be mutable. Some
887+
This lint detects mut variables which don't need to be mutable. Some
888888
example code that triggers this lint:
889889

890890
```rust
@@ -946,7 +946,7 @@ warning: unnecessary `unsafe` block
946946

947947
## unused-variables
948948

949-
This lint detects detect variables which are not used in any way. Some
949+
This lint detects variables which are not used in any way. Some
950950
example code that triggers this lint:
951951

952952
```rust

src/doc/rustdoc/src/documentation-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ compiles, while only showing the parts that are relevant to that part of your
171171
explanation.
172172
173173
The `#`-hiding of lines can be prevented by using two consecutive hashes
174-
`##`. This only needs to be done with with the first `#` which would've
174+
`##`. This only needs to be done with the first `#` which would've
175175
otherwise caused hiding. If we have a string literal like the following,
176176
which has a line that starts with a `#`:
177177

src/librustc/infer/opaque_types/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub type OpaqueTypeMap<'tcx> = DefIdMap<OpaqueTypeDecl<'tcx>>;
1919
/// appear in the return type).
2020
#[derive(Copy, Clone, Debug)]
2121
pub struct OpaqueTypeDecl<'tcx> {
22-
/// The substitutions that we apply to the abstract that that this
22+
/// The substitutions that we apply to the abstract that this
2323
/// `impl Trait` desugars to. e.g., if:
2424
///
2525
/// fn foo<'a, 'b, T>() -> impl Trait<'a>

src/librustc/mir/interpret/value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub enum Scalar<Tag=(), Id=AllocId> {
8787
/// The raw bytes of a simple value.
8888
Bits {
8989
/// The first `size` bytes are the value.
90-
/// Do not try to read less or more bytes that that. The remaining bytes must be 0.
90+
/// Do not try to read less or more bytes than that. The remaining bytes must be 0.
9191
size: u8,
9292
bits: u128,
9393
},

src/librustc/ty/fold.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub trait TypeFoldable<'tcx>: fmt::Debug + Clone {
110110
self.has_type_flags(TypeFlags::HAS_FREE_REGIONS)
111111
}
112112

113-
/// True if there any any un-erased free regions.
113+
/// True if there any un-erased free regions.
114114
fn has_erasable_regions(&self) -> bool {
115115
self.has_type_flags(TypeFlags::HAS_FREE_REGIONS)
116116
}

src/librustc_apfloat/ieee.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2341,7 +2341,7 @@ mod sig {
23412341
// Our exponent should not underflow.
23422342
*exp = exp.checked_sub(bits as ExpInt).unwrap();
23432343

2344-
// Jump is the inter-limb jump; shift is is intra-limb shift.
2344+
// Jump is the inter-limb jump; shift is the intra-limb shift.
23452345
let jump = bits / LIMB_BITS;
23462346
let shift = bits % LIMB_BITS;
23472347

@@ -2375,7 +2375,7 @@ mod sig {
23752375
// Our exponent should not overflow.
23762376
*exp = exp.checked_add(bits as ExpInt).unwrap();
23772377

2378-
// Jump is the inter-limb jump; shift is is intra-limb shift.
2378+
// Jump is the inter-limb jump; shift is the intra-limb shift.
23792379
let jump = bits / LIMB_BITS;
23802380
let shift = bits % LIMB_BITS;
23812381

src/librustc_lint/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ impl EarlyLintPass for AnonymousParameters {
673673
}
674674
}
675675

676-
/// Checks for incorrect use use of `repr` attributes.
676+
/// Checks for incorrect use of `repr` attributes.
677677
#[derive(Clone)]
678678
pub struct BadRepr;
679679

src/librustc_resolve/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ use foo::core; // error: an extern crate named `core` has already
192192
fn main() {}
193193
```
194194
195-
To fix issue issue, you have to rename at least one of the two imports.
195+
To fix this issue, you have to rename at least one of the two imports.
196196
Example:
197197
198198
```

src/librustc_typeck/check/demand.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
335335
// we may want to suggest adding a `*`, or removing
336336
// a `&`.
337337
//
338-
// (But, also check check the `expn_info()` to see if this is
338+
// (But, also check the `expn_info()` to see if this is
339339
// a macro; if so, it's hard to extract the text and make a good
340340
// suggestion, so don't bother.)
341341
if self.infcx.can_sub(self.param_env, checked, &expected).is_ok() &&

src/librustdoc/clean/auto_trait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ impl<'a, 'tcx, 'rcx> AutoTraitFinder<'a, 'tcx, 'rcx> {
534534
did, param_env, type_generics, existing_predicates
535535
);
536536

537-
// The `Sized` trait must be handled specially, since we only only display it when
537+
// The `Sized` trait must be handled specially, since we only display it when
538538
// it is *not* required (i.e., '?Sized')
539539
let sized_trait = self.cx
540540
.tcx

src/libstd/collections/hash/set.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl<T, S> HashSet<T, S>
179179
HashSet { map: HashMap::with_hasher(hasher) }
180180
}
181181

182-
/// Creates an empty `HashSet` with with the specified capacity, using
182+
/// Creates an empty `HashSet` with the specified capacity, using
183183
/// `hasher` to hash the keys.
184184
///
185185
/// The hash set will be able to hold at least `capacity` elements without

src/libstd/sys/cloudabi/abi/cloudabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
//!
108108
//! ## Specification of the ABI
109109
//!
110-
//! The entire ABI is specified in a a file called
110+
//! The entire ABI is specified in a file called
111111
//! [`cloudabi.txt`](https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt),
112112
//! from which all
113113
//! [headers](https://github.com/NuxiNL/cloudabi/tree/master/headers)

src/libstd/sys/windows/ext/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub trait OpenOptionsExt {
126126
///
127127
/// By default `share_mode` is set to
128128
/// `FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE`. This allows
129-
/// other processes to to read, write, and delete/rename the same file
129+
/// other processes to read, write, and delete/rename the same file
130130
/// while it is open. Removing any of the flags will prevent other
131131
/// processes from performing the corresponding operation until the file
132132
/// handle is closed.

src/libsyntax/ext/tt/macro_parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ struct MatcherPos<'root, 'tt: 'root> {
161161
/// The position of the "dot" in this matcher
162162
idx: usize,
163163

164-
/// The first span of source source that the beginning of this matcher corresponds to. In other
164+
/// The first span of source that the beginning of this matcher corresponds to. In other
165165
/// words, the token in the source whose span is `sp_open` is matched against the first token of
166166
/// the matcher.
167167
sp_open: Span,

src/test/debuginfo/simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// FIXME: LLVM generates invalid debug info for variables requiring
66
// dynamic stack realignment, which is the case on s390x for vector
7-
// types with with non-vector ABI.
7+
// types with non-vector ABI.
88
// ignore-s390x
99

1010
// compile-flags:-g

src/test/run-make-fulldeps/relro-levels/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-include ../tools.mk
22

3-
# This tests the different -Zrelro-level values, and makes sure that they they work properly.
3+
# This tests the different -Zrelro-level values, and makes sure that they work properly.
44

55
all:
66
ifeq ($(UNAME),Linux)

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,7 @@ impl<'test> TestCx<'test> {
25692569
.env("LLVM_CXXFLAGS", &self.config.llvm_cxxflags)
25702570

25712571
// We for sure don't want these tests to run in parallel, so make
2572-
// sure they don't have access to these vars if we we run via `make`
2572+
// sure they don't have access to these vars if we run via `make`
25732573
// at the top level
25742574
.env_remove("MAKEFLAGS")
25752575
.env_remove("MFLAGS")

0 commit comments

Comments
 (0)