Skip to content

Commit ffb2c46

Browse files
authored
Merge pull request #3690 from cuishuang/master
fix some comments
2 parents 7b7e8b9 + 9ce224f commit ffb2c46

11 files changed

+11
-11
lines changed

text/0339-statically-sized-literals.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The alternative design is to make the literals the values and not the references
115115
1)
116116
Keep the types of array literals as `[T, ..N]`.
117117
Change the types of byte literals from `&'static [u8]` to `[u8, ..N]`.
118-
Change the types of string literals form `&'static str` to to `FixedString<N>`.
118+
Change the types of string literals form `&'static str` to `FixedString<N>`.
119119
2)
120120
Introduce the missing family of types - strings of fixed size - `FixedString<N>`.
121121
...

text/0403-cargo-build-command.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ are target triples. The dependencies section underneath is the same as the
184184
top-level dependencies section in terms of functionality.
185185

186186
Semantically, platform specific dependencies are activated whenever Cargo is
187-
compiling for a the exact target. Dependencies in other `$target` sections
187+
compiling for the exact target. Dependencies in other `$target` sections
188188
will not be compiled.
189189

190190
However, when generating a lockfile, Cargo will always download all dependencies

text/1869-eprintln.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ instead; similarly for `print!`.
7575

7676
The usual drawbacks of adding macros to the prelude apply. In this
7777
case, I think the most significant concern is to choose names that are
78-
unlikely to to conflict with existing library crates' _exported_
78+
unlikely to conflict with existing library crates' _exported_
7979
macros. (Conversely, _internal_ macros with the same names and
8080
semantics demonstrate that the names chosen are appropriate.)
8181

text/1990-external-doc-attribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ provide context as to what's going on and where to find this file for inclusion.
182182
The acceptance of this proposal would minimally impact all levels of Rust users
183183
as it is something that provides convenience but is not a necessary thing to
184184
learn to use Rust. It should be taught to existing users by updating
185-
documentation to show it in use and to include in in the Rust Programming
185+
documentation to show it in use and to include in the Rust Programming
186186
Language book to teach new users. Currently the newest version of The Rust
187187
Programming Language book has a section for [doc comments](https://doc.rust-lang.org/nightly/book/second-edition/ch14-02-publishing-to-crates-io.html#documentation-comments) that will need to be expanded
188188
to show how users can include docs from external sources. The Rust Reference

text/2300-self-in-typedefs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ impl Trait for Foo {
638638
### Conclusion
639639

640640
We've now examined a few cases and seen that indeed, the meaning of `Self` is
641-
consistent in all of them as well as with what the meaning in in today's Rust.
641+
consistent in all of them as well as with what the meaning in today's Rust.
642642

643643
## Doing nothing
644644

text/2361-dbg-macro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ However a library can always define another macro with the same name and shadow
140140
# Rationale and alternatives
141141
[alternatives]: #alternatives
142142

143-
[RFC 2173] and provides an a more complex alternative that offers more control but is also more complex.
143+
[RFC 2173] and provides a more complex alternative that offers more control but is also more complex.
144144
This RFC was designed with the goal of being a simpler and thus better fit for the standard library.
145145

146146
## Alternative: tweaking formatting

text/2451-re-rebalancing-coherence.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ least one of the following is true:
192192
- No uncovered type parameters `P1..=Pn` may appear in `T0..Ti` (excluding
193193
`Ti`)
194194

195-
The primary change from the rules defined in in [RFC #1023] is that we only
195+
The primary change from the rules defined in [RFC #1023] is that we only
196196
restrict the appearance of *uncovered* type parameters. Once again, it is
197197
important to note that for the purposes of coherence, `#[fundamental]` types are
198198
special. `Box<T>` is not considered covered, and `Box<LocalType>` is considered

text/2867-isa-attribute.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn add_one(x: i32) -> i32 {
2828
x + 1
2929
}
3030

31-
// This will compile as `a32` code on both `arm` and thumb` targets
31+
// This will compile as `a32` code on both `arm` and `thumb` targets
3232
#[instruction_set(arm::a32)]
3333
fn add_five(x: i32) -> i32 {
3434
x + 5

text/3389-manifest-lint.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ Where `rust-version` is used by cargo to determine whether to pass along this
537537
lint and `threshold` is used by the tool. We'd need to define how to
538538
distinguish between reserved and unreserved field names.
539539

540-
Tool-wide configuration would be in in the `lints.<tool>.metadata` table and be
540+
Tool-wide configuration would be in the `lints.<tool>.metadata` table and be
541541
completely ignored by `cargo`. For example:
542542
```toml
543543
[lints.clippy.metadata]

text/3467-unsafe-pinned.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ However, of course one could imagine alternatives:
412412
- `UnsafePinned` could affect aliasing guarantees *both* on mutable and shared references. This would avoid the currently rather subtle situation that arises when one of many aliasing `&mut UnsafePinned<T>` is cast or coerced to `&UnsafePinned<T>`: that is a read-only shared reference and all aliases must stop writing!
413413
It would make this type strictly more 'powerful' than `UnsafeCell` in the sense that replacing `UnsafeCell` by `UnsafePinned` would always be correct. (Under the RFC as written, `UnsafeCell` and `UnsafePinned` can be nested to remove aliasing requirements from both shared and mutable references.)
414414

415-
If we don't do this, we could consider removing `get` since since it seems too much like a foot-gun.
415+
If we don't do this, we could consider removing `get` since it seems too much like a foot-gun.
416416
But that makes shared references to `UnsafePinned` fairly pointless. Shared references to generators/futures are basically useless so it is unclear what the potential use-cases here are.
417417

418418
- Instead of introducing a new type, we could say that `UnsafeCell` affects *both* shared and mutable references. That would lose some optimization potential on types like `&mut Cell<T>`, but would avoid the footgun of coercing an `&mut UnsafePinned<T>` to `&UnsafePinned<T>`. That said, so far the author is not aware of Miri detecting code that would run into this footgun (and Miri is [able to detect such issues](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=aab417b535f7dbd266fbfe470ea208c7)).

text/3550-new-range.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl Index<std::range::Range<usize>> for Bar { ... }
215215

216216
## Diagnostics
217217

218-
There is a substantial amount of educational material in the wild which assumes the the range types implement `Iterator`. If a user references this outdated material, it is important that compiler errors guide them to the new solution.
218+
There is a substantial amount of educational material in the wild which assumes the range types implement `Iterator`. If a user references this outdated material, it is important that compiler errors guide them to the new solution.
219219

220220
```
221221
error[E0599]: `Range<usize>` is not an iterator

0 commit comments

Comments
 (0)