Skip to content

Commit 34f045e

Browse files
authored
Merge pull request #3598 from JohnEndson/master
chore: fix some comments
2 parents 02f38df + 4417196 commit 34f045e

7 files changed

+10
-10
lines changed

text/0461-tls-overhaul.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ have `with` `panic!` instead.
215215
## Owning TLS
216216

217217
Although scoped TLS can store any value, it is also limited in the fact that it
218-
cannot own a value. This means that TLS values cannot escape the stack from from
218+
cannot own a value. This means that TLS values cannot escape the stack from
219219
which they originated from. This is itself another common usage pattern of TLS,
220220
and to solve this problem the `std::tls` module will provided support for
221221
placing owned values into TLS.

text/0494-c_str-and-c_vec-stability.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ and `with_c_str` methods are no longer in the prelude by default, and
179179
directly calling `CString::from_vec`, but it may be more frequently called via
180180
`CString::from_slice`, resulting in an unnecessary allocation. Note, however,
181181
that one would have to remember to call `into_c_str` on the `ToCStr` trait, so
182-
it doesn't necessarily help too too much.
182+
it doesn't necessarily help too much.
183183

184184
* The ergonomics of operating C strings have been somewhat reduced as part of
185185
this design. The `CString::from_slice` method is somewhat long to call

text/1044-io-fs-2.1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ future, such as [C++'s template parameter][cpp-dir-template]:
372372
pub fn template<P: AsRef<Path>>(&mut self, path: P) -> &mut Self;
373373
```
374374

375-
At this time, however, it it not proposed to add this method to
375+
At this time, however, it is not proposed to add this method to
376376
`DirBuilder`.
377377

378378
## Adding `FileType`

text/1414-rvalue_static_promotion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ let x: &'static T = &<constexpr foo>;
118118
The necessary changes in the compiler did already get implemented as
119119
part of codegen optimizations (emitting references-to or memcopies-from values in static memory instead of embedding them in the code).
120120

121-
All that is left do do is "throw the switch" for the new lifetime semantic
121+
All that is left to do is "throw the switch" for the new lifetime semantic
122122
by removing these lines:
123123
https://github.com/rust-lang/rust/blob/29ea4eef9fa6e36f40bc1f31eb1e56bf5941ee72/src/librustc/middle/mem_categorization.rs#L801-L807
124124

text/2044-license-rfcs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Also, after this RFC got merged, all RFCs in the queue will get a comment in
8585
their Github PR and be asked to include the copyright section at the top of
8686
their RFC file.
8787

88-
The note in README.md should should inform new PR authors of the terms
88+
The note in README.md should inform new PR authors of the terms
8989
they put their contribution under.
9090

9191
# Drawbacks

text/3509-prelude-2024-future.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mod rust_2024 {
5555
# Tradeoffs
5656
[tradeoffs]: #tradeoffs
5757

58-
Both the `Future` and `IntoFuture` definitions in the standard library are considered _canonical_: there exist no widespread alternative definitions in the Rust ecosystem. Simply having both traits in scope is unlikely to lead to any issues, and the only likely noticable outcome is that authoring async code will require slightly less effort.
58+
Both the `Future` and `IntoFuture` definitions in the standard library are considered _canonical_: there exist no widespread alternative definitions in the Rust ecosystem. Simply having both traits in scope is unlikely to lead to any issues, and the only likely noticeable outcome is that authoring async code will require slightly less effort.
5959

6060
# Rationale and alternatives
6161
[rationale-and-alternatives]: #rationale-and-alternatives
@@ -68,7 +68,7 @@ However, it's possible to use different criteria for what should be included in
6868

6969
Both of these perspectives can be applied to other scenarios too. Let's say we're finally able to stabilize the `Try` trait; should this be included in the following prelude? From a systems-based perspective, the answer would be "yes", since it's a fundamental operation which enables types to be named. From the merit-based perspective the answer would likely be "no", since it will be a new trait with limited usage. But it might be re-considered once it sees enough usage.
7070

71-
We believe that taking a merit-based perspective makes sense if the upsides of a choice also carry noteable downsides. But as covered in the "tradeoffs" section of this RFC, there don't appear to be any meaningful downsides. So instead it seems better to base our evalutation on how the traits relate to the language, rather than on how much usage they see.
71+
We believe that taking a merit-based perspective makes sense if the upsides of a choice also carry notable downsides. But as covered in the "tradeoffs" section of this RFC, there don't appear to be any meaningful downsides. So instead it seems better to base our evaluation on how the traits relate to the language, rather than on how much usage they see.
7272

7373
# Prior art
7474
[prior-art]: #prior-art
@@ -81,7 +81,7 @@ The Rust 2021 edition includes three new traits:
8181
- `TryFrom` - fallible conversion
8282
- `TryInto` - fallible conversion (inverted)
8383

84-
All three of these traits represent fundamental operations present in Rust. This is a natural supplement to other fundamental operations present in earlier editions such as `Try`, `Into`, and `IntoIterator`. I'd argue that `Future` and `IntoFuture` have an an equal, if not more fundamental relationship to the Rust language than `TryFrom` or `FromIterator` do.
84+
All three of these traits represent fundamental operations present in Rust. This is a natural supplement to other fundamental operations present in earlier editions such as `Try`, `Into`, and `IntoIterator`. I'd argue that `Future` and `IntoFuture` have an equal, if not more fundamental relationship to the Rust language than `TryFrom` or `FromIterator` do.
8585

8686
# Unresolved questions
8787
[unresolved-questions]: #unresolved-questions

text/3543-patchable-function-entry.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Possible actions we could take include:
203203

204204
Since we don't have a way to "reset" inlining to default, any plan involving suppression of inlining also needs to come with additional configuration to suppress the suppression.
205205

206-
### Inline suppresssion
206+
### Inline suppression
207207
If the function has nonzero `entry` padding, prevent inlining.
208208

209209
Add `-C allow-patchable-function-inlining` to disable this behavior.
@@ -214,7 +214,7 @@ The advantage of this approach is that any instrumentation will always trigger w
214214

215215
Disadvantages:
216216

217-
- When the flag is passed, we will disable inlining *nearly everywhere*. This would be disasterous for performance, given the number of functions Rust depends on inlining to optimize.
217+
- When the flag is passed, we will disable inlining *nearly everywhere*. This would be disastrous for performance, given the number of functions Rust depends on inlining to optimize.
218218
- This does not match C/C++ behavior, which means most existing use cases will be surprised.
219219
- We need to add flag complexity to match existing use cases.
220220

0 commit comments

Comments
 (0)