about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLéo Lanteri Thauvin <leseulartichaut@gmail.com>2021-08-25 15:48:53 +0200
committerGitHub <noreply@github.com>2021-08-25 15:48:53 +0200
commitcc2a1271d430d633b712dab71e2e58feb959c01b (patch)
tree4520f55b5f8aed08f940dffe7953f78f7764fb1e /src
parentb09c2547df8c0ab832b5b6764f8587e850a12533 (diff)
parent6248dbcf70fbae9cf6fda9e2b2ba55aeb5837b36 (diff)
downloadrust-cc2a1271d430d633b712dab71e2e58feb959c01b.tar.gz
rust-cc2a1271d430d633b712dab71e2e58feb959c01b.zip
Rollup merge of #88226 - steffahn:an_rc, r=michaelwoerister
Fix typo “a Rc” → “an Rc” (and a few more)

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.
```plain
$ 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
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/drop/dropck_legal_cycles.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/drop/dropck_legal_cycles.rs b/src/test/ui/drop/dropck_legal_cycles.rs
index fb13fd764bf..27a599315dc 100644
--- a/src/test/ui/drop/dropck_legal_cycles.rs
+++ b/src/test/ui/drop/dropck_legal_cycles.rs
@@ -368,7 +368,7 @@ pub fn main() {
     // We can use refcells if we're single-threaded (as this test is).
     // If one were to generalize these constructions to a
     // multi-threaded context, then it might seem like we could choose
-    // between either a RwLock or a Mutex to hold the owned arcs on
+    // between either an RwLock or a Mutex to hold the owned arcs on
     // each node.
     //
     // Part of the point of this test is to actually confirm that the