diff options
| author | bors <bors@rust-lang.org> | 2021-08-25 16:22:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-25 16:22:57 +0000 |
| commit | 7b0e554ee2c94e9b3865a8c2d24d720224512dec (patch) | |
| tree | c593474b55894db3cd17a5a78200005ba265bd53 /compiler/rustc_data_structures/src | |
| parent | a992a11913b39a258158646bb1e03528c5aa5060 (diff) | |
| parent | d9ed23a9130b0941fd1ed4a651cbbec8a6621dd8 (diff) | |
| download | rust-7b0e554ee2c94e9b3865a8c2d24d720224512dec.tar.gz rust-7b0e554ee2c94e9b3865a8c2d24d720224512dec.zip | |
Auto merge of #88329 - LeSeulArtichaut:rollup-blg8hc0, r=LeSeulArtichaut
Rollup of 16 pull requests Successful merges: - #87944 (add Cell::as_array_of_cells, similar to Cell::as_slice_of_cells) - #88156 (Adjust / fix documentation of `Arc::make_mut`) - #88157 (bootstrap.py: recognize riscv64 when auto-detect) - #88196 (Refactor `named_asm_labels` to a HIR lint) - #88218 (Remove `Session.trait_methods_not_found`) - #88223 (Remove the `TryV2` alias) - #88226 (Fix typo “a Rc” → “an Rc” (and a few more)) - #88267 (2229: Update signature for truncate function) - #88273 (Fix references to `ControlFlow` in docs) - #88277 (Update books) - #88291 (Add SAFETY comments to core::slice::sort::partition_in_blocks) - #88293 (Fix grammar in alloc test) - #88298 (Errorkind reorder) - #88299 (Stabilise BufWriter::into_parts) - #88314 (Add type of a let tait test) - #88325 (Add mutable-noalias to the release notes for 1.54) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/owning_ref/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_data_structures/src/owning_ref/mod.rs b/compiler/rustc_data_structures/src/owning_ref/mod.rs index 5b27a407ad4..e7397bf13ba 100644 --- a/compiler/rustc_data_structures/src/owning_ref/mod.rs +++ b/compiler/rustc_data_structures/src/owning_ref/mod.rs @@ -5,7 +5,7 @@ This crate provides the _owning reference_ types `OwningRef` and `OwningRefMut` that enables it to bundle a reference together with the owner of the data it points to. -This allows moving and dropping of a `OwningRef` without needing to recreate the reference. +This allows moving and dropping of an `OwningRef` without needing to recreate the reference. This can sometimes be useful because Rust borrowing rules normally prevent moving a type that has been moved from. For example, this kind of code gets rejected: @@ -1146,7 +1146,7 @@ pub type VecRef<T, U = T> = OwningRef<Vec<T>, U>; /// Typedef of an owning reference that uses a `String` as the owner. pub type StringRef = OwningRef<String, str>; -/// Typedef of an owning reference that uses a `Rc` as the owner. +/// Typedef of an owning reference that uses an `Rc` as the owner. pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>; /// Typedef of an owning reference that uses an `Arc` as the owner. pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>; @@ -1157,9 +1157,9 @@ pub type RefRef<'a, T, U = T> = OwningRef<Ref<'a, T>, U>; pub type RefMutRef<'a, T, U = T> = OwningRef<RefMut<'a, T>, U>; /// Typedef of an owning reference that uses a `MutexGuard` as the owner. pub type MutexGuardRef<'a, T, U = T> = OwningRef<MutexGuard<'a, T>, U>; -/// Typedef of an owning reference that uses a `RwLockReadGuard` as the owner. +/// Typedef of an owning reference that uses an `RwLockReadGuard` as the owner. pub type RwLockReadGuardRef<'a, T, U = T> = OwningRef<RwLockReadGuard<'a, T>, U>; -/// Typedef of an owning reference that uses a `RwLockWriteGuard` as the owner. +/// Typedef of an owning reference that uses an `RwLockWriteGuard` as the owner. pub type RwLockWriteGuardRef<'a, T, U = T> = OwningRef<RwLockWriteGuard<'a, T>, U>; /// Typedef of a mutable owning reference that uses a `Box` as the owner. @@ -1173,7 +1173,7 @@ pub type StringRefMut = OwningRefMut<String, str>; pub type RefMutRefMut<'a, T, U = T> = OwningRefMut<RefMut<'a, T>, U>; /// Typedef of a mutable owning reference that uses a `MutexGuard` as the owner. pub type MutexGuardRefMut<'a, T, U = T> = OwningRefMut<MutexGuard<'a, T>, U>; -/// Typedef of a mutable owning reference that uses a `RwLockWriteGuard` as the owner. +/// Typedef of a mutable owning reference that uses an `RwLockWriteGuard` as the owner. pub type RwLockWriteGuardRefMut<'a, T, U = T> = OwningRef<RwLockWriteGuard<'a, T>, U>; unsafe impl<'a, T: 'a> IntoErased<'a> for Box<T> { |
