Skip to content

Fix typo “a Rc” → “an Rc” (and a few more) #88226

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Aug 25, 2021

Conversation

steffahn
Copy link
Member

@steffahn steffahn commented Aug 22, 2021

After stumbling about it in the dev-guide, I’ve devided to eliminate all mentions of “a Rc”, replacing it with “an Rc”. E.g.

$ rg "(^|[^'])\ba\b[^\w=:]*\bRc" 
compiler/rustc_data_structures/src/owning_ref/mod.rs
1149:/// Typedef of a owning reference that uses a `Rc` as the owner.

library/std/src/ffi/os_str.rs
919:    /// Converts a [`OsString`] into a [`Rc`]`<OsStr>` without copying or allocating.

library/std/src/ffi/c_str.rs
961:    /// Converts a [`CString`] into a [`Rc`]`<CStr>` without copying or allocating.

src/doc/rustc-dev-guide/src/query.md
61:are cheaply cloneable; insert a `Rc` if necessary).

src/doc/book/src/ch15-06-reference-cycles.md
72:decreases the reference count of the `a` `Rc<List>` instance from 2 to 1 as

library/alloc/src/rc.rs
1746:    /// Converts a generic type `T` into a `Rc<T>`

(the match in the book is a false positive)
Since the dev-guide is a submodule, it’s getting a separate PR: rust-lang/rustc-dev-guide#1191

I’ve also gone ahead and done the same search for RwLock and hit a few cases in the OwningRef adaption. Then, I couldn’t keep the countless cases of “a owning …” or “a owner” unaddressed, which concludes this PR.

@rustbot label C-cleanup

@rustbot rustbot added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Aug 22, 2021
@rust-highfive
Copy link
Contributor

r? @michaelwoerister

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 22, 2021
m-ou-se added a commit to m-ou-se/rust that referenced this pull request Aug 23, 2021
Fix typos “a”→“an”

Fix typos in comments; found using a regex to find some easy instance of incorrect usage of a vs. an.

While automation was used to find these, every change was checked manually.

Changes in submodules get separate PRs:
* rust-lang/stdarch#1201
* rust-lang/cargo#9821
* rust-lang/miri#1874
* rust-lang/rls#1746
* rust-lang/rust-analyzer#9984
  _folks @ rust-analyzer are fast at merging…_
  * rust-lang/rust-analyzer#9985
  * rust-lang/rust-analyzer#9987
  * rust-lang/rust-analyzer#9989

_For `clippy`, I don’t know if the changes should better better be moved to a PR to the original repo._

<hr>

This has some overlap with rust-lang#88226, but neither is a strict superset of the other.

If you want multiple commits, I can split it up; in that case, make sure to suggest a criterion for splitting.
@bors
Copy link
Collaborator

bors commented Aug 23, 2021

☔ The latest upstream changes (presumably #88265) made this pull request unmergeable. Please resolve the merge conflicts.

@steffahn
Copy link
Member Author

Unsurprisingly, I’ve created my own merge conflict here…

@steffahn
Copy link
Member Author

…now resolved ^^

@michaelwoerister
Copy link
Member

Thanks, @steffahn!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 24, 2021

📌 Commit 6248dbc has been approved by michaelwoerister

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 24, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 25, 2021
…eulArtichaut

Rollup of 16 pull requests

Successful merges:

 - rust-lang#87944 (add Cell::as_array_of_cells, similar to Cell::as_slice_of_cells)
 - rust-lang#88156 (Adjust / fix documentation of `Arc::make_mut`)
 - rust-lang#88157 (bootstrap.py: recognize riscv64 when auto-detect)
 - rust-lang#88196 (Refactor `named_asm_labels` to a HIR lint)
 - rust-lang#88218 (Remove `Session.trait_methods_not_found`)
 - rust-lang#88223 (Remove the `TryV2` alias)
 - rust-lang#88226 (Fix typo “a Rc” → “an Rc” (and a few more))
 - rust-lang#88267 (2229: Update signature for truncate function)
 - rust-lang#88273 (Fix references to `ControlFlow` in docs)
 - rust-lang#88277 (Update books)
 - rust-lang#88291 (Add SAFETY comments to core::slice::sort::partition_in_blocks)
 - rust-lang#88293 (Fix grammar in alloc test)
 - rust-lang#88298 (Errorkind reorder)
 - rust-lang#88299 (Stabilise BufWriter::into_parts)
 - rust-lang#88314 (Add type of a let tait test)
 - rust-lang#88325 (Add mutable-noalias to the release notes for 1.54)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cc2a127 into rust-lang:master Aug 25, 2021
@rustbot rustbot added this to the 1.56.0 milestone Aug 25, 2021
@steffahn steffahn deleted the an_rc branch August 25, 2021 20:12
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 3, 2021
Fix typos “a”→“an”

Fix typos in comments; found using a regex to find some easy instance of incorrect usage of a vs. an.

While automation was used to find these, every change was checked manually.

Changes in submodules get separate PRs:
* rust-lang/stdarch#1201
* rust-lang/cargo#9821
* rust-lang/miri#1874
* rust-lang/rls#1746
* rust-lang/rust-analyzer#9984
  _folks @ rust-analyzer are fast at merging…_
  * rust-lang/rust-analyzer#9985
  * rust-lang/rust-analyzer#9987
  * rust-lang/rust-analyzer#9989

_For `clippy`, I don’t know if the changes should better better be moved to a PR to the original repo._

<hr>

This has some overlap with rust-lang#88226, but neither is a strict superset of the other.

If you want multiple commits, I can split it up; in that case, make sure to suggest a criterion for splitting.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants