about summary refs log tree commit diff
path: root/compiler/rustc_data_structures
diff options
context:
space:
mode:
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-22 14:46:15 +0200
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-22 15:35:11 +0200
commitbf88b113eab9c36e63f8461f5849138cb60d810a (patch)
treef333d6f75d1ec09c17554a69c6420ced3203adf2 /compiler/rustc_data_structures
parent2ad56d5c9031636c1509f4417e88099a49405b4e (diff)
downloadrust-bf88b113eab9c36e63f8461f5849138cb60d810a.tar.gz
rust-bf88b113eab9c36e63f8461f5849138cb60d810a.zip
Fix typos “a”→“an”
Diffstat (limited to 'compiler/rustc_data_structures')
-rw-r--r--compiler/rustc_data_structures/src/owning_ref/mod.rs48
-rw-r--r--compiler/rustc_data_structures/src/profiling.rs2
-rw-r--r--compiler/rustc_data_structures/src/sync.rs2
-rw-r--r--compiler/rustc_data_structures/src/tiny_list.rs2
4 files changed, 27 insertions, 27 deletions
diff --git a/compiler/rustc_data_structures/src/owning_ref/mod.rs b/compiler/rustc_data_structures/src/owning_ref/mod.rs
index ad4b79de236..19b4426981c 100644
--- a/compiler/rustc_data_structures/src/owning_ref/mod.rs
+++ b/compiler/rustc_data_structures/src/owning_ref/mod.rs
@@ -321,7 +321,7 @@ pub unsafe trait IntoErasedSendSync<'a> {
 /////////////////////////////////////////////////////////////////////////////
 
 impl<O, T: ?Sized> OwningRef<O, T> {
-    /// Creates a new owning reference from a owner
+    /// Creates a new owning reference from an owner
     /// initialized to the direct dereference of it.
     ///
     /// # Example
@@ -368,7 +368,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
     /// fn main() {
     ///     let owning_ref = OwningRef::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref = owning_ref.map(|array| &array[2]);
     ///     assert_eq!(*owning_ref, 3);
@@ -396,7 +396,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
     /// fn main() {
     ///     let owning_ref = OwningRef::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref = owning_ref.try_map(|array| {
     ///         if array[2] == 3 { Ok(&array[2]) } else { Err(()) }
@@ -430,7 +430,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
     /// in an additional `Box<O>`.
     ///
     /// This can be used to safely erase the owner of any `OwningRef<O, T>`
-    /// to a `OwningRef<Box<Erased>, T>`.
+    /// to an `OwningRef<Box<Erased>, T>`.
     pub fn map_owner_box(self) -> OwningRef<Box<O>, T> {
         OwningRef { reference: self.reference, owner: Box::new(self.owner) }
     }
@@ -511,7 +511,7 @@ impl<O, T: ?Sized> OwningRef<O, T> {
 }
 
 impl<O, T: ?Sized> OwningRefMut<O, T> {
-    /// Creates a new owning reference from a owner
+    /// Creates a new owning reference from an owner
     /// initialized to the direct dereference of it.
     ///
     /// # Example
@@ -558,7 +558,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
     /// fn main() {
     ///     let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref = owning_ref_mut.map(|array| &array[2]);
     ///     assert_eq!(*owning_ref, 3);
@@ -586,7 +586,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
     /// fn main() {
     ///     let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref_mut = owning_ref_mut.map_mut(|array| &mut array[2]);
     ///     assert_eq!(*owning_ref_mut, 3);
@@ -614,7 +614,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
     /// fn main() {
     ///     let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref = owning_ref_mut.try_map(|array| {
     ///         if array[2] == 3 { Ok(&array[2]) } else { Err(()) }
@@ -644,7 +644,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
     /// fn main() {
     ///     let owning_ref_mut = OwningRefMut::new(Box::new([1, 2, 3, 4]));
     ///
-    ///     // create a owning reference that points at the
+    ///     // create an owning reference that points at the
     ///     // third element of the array.
     ///     let owning_ref_mut = owning_ref_mut.try_map_mut(|array| {
     ///         if array[2] == 3 { Ok(&mut array[2]) } else { Err(()) }
@@ -678,7 +678,7 @@ impl<O, T: ?Sized> OwningRefMut<O, T> {
     /// in an additional `Box<O>`.
     ///
     /// This can be used to safely erase the owner of any `OwningRefMut<O, T>`
-    /// to a `OwningRefMut<Box<Erased>, T>`.
+    /// to an `OwningRefMut<Box<Erased>, T>`.
     pub fn map_owner_box(self) -> OwningRefMut<Box<O>, T> {
         OwningRefMut { reference: self.reference, owner: Box::new(self.owner) }
     }
@@ -970,7 +970,7 @@ where
     }
 }
 
-// ^ FIXME: Is a Into impl for calling into_inner() possible as well?
+// ^ FIXME: Is an Into impl for calling into_inner() possible as well?
 
 impl<O, T: ?Sized> Debug for OwningRef<O, T>
 where
@@ -1139,27 +1139,27 @@ impl<T: 'static> ToHandleMut for RefCell<T> {
 // about which handle creation to use (i.e., read() vs try_read()) as well as
 // what to do with error results.
 
-/// Typedef of a owning reference that uses a `Box` as the owner.
+/// Typedef of an owning reference that uses a `Box` as the owner.
 pub type BoxRef<T, U = T> = OwningRef<Box<T>, U>;
-/// Typedef of a owning reference that uses a `Vec` as the owner.
+/// Typedef of an owning reference that uses a `Vec` as the owner.
 pub type VecRef<T, U = T> = OwningRef<Vec<T>, U>;
-/// Typedef of a owning reference that uses a `String` as the owner.
+/// Typedef of an owning reference that uses a `String` as the owner.
 pub type StringRef = OwningRef<String, str>;
 
-/// Typedef of a owning reference that uses a `Rc` as the owner.
+/// Typedef of an owning reference that uses a `Rc` as the owner.
 pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
-/// Typedef of a owning reference that uses a `Arc` as the owner.
+/// Typedef of an owning reference that uses a `Arc` as the owner.
 pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;
 
-/// Typedef of a owning reference that uses a `Ref` as the owner.
+/// Typedef of an owning reference that uses a `Ref` as the owner.
 pub type RefRef<'a, T, U = T> = OwningRef<Ref<'a, T>, U>;
-/// Typedef of a owning reference that uses a `RefMut` as the owner.
+/// Typedef of an owning reference that uses a `RefMut` as the owner.
 pub type RefMutRef<'a, T, U = T> = OwningRef<RefMut<'a, T>, U>;
-/// Typedef of a owning reference that uses a `MutexGuard` as the owner.
+/// 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 a owning reference that uses a `RwLockReadGuard` as the owner.
+/// Typedef of an owning reference that uses a `RwLockReadGuard` as the owner.
 pub type RwLockReadGuardRef<'a, T, U = T> = OwningRef<RwLockReadGuard<'a, T>, U>;
-/// Typedef of a owning reference that uses a `RwLockWriteGuard` as the owner.
+/// Typedef of an owning reference that uses a `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.
@@ -1219,11 +1219,11 @@ unsafe impl<'a, T: Send + Sync + 'a> IntoErasedSendSync<'a> for Arc<T> {
     }
 }
 
-/// Typedef of a owning reference that uses an erased `Box` as the owner.
+/// Typedef of an owning reference that uses an erased `Box` as the owner.
 pub type ErasedBoxRef<U> = OwningRef<Box<dyn Erased>, U>;
-/// Typedef of a owning reference that uses an erased `Rc` as the owner.
+/// Typedef of an owning reference that uses an erased `Rc` as the owner.
 pub type ErasedRcRef<U> = OwningRef<Rc<dyn Erased>, U>;
-/// Typedef of a owning reference that uses an erased `Arc` as the owner.
+/// Typedef of an owning reference that uses an erased `Arc` as the owner.
 pub type ErasedArcRef<U> = OwningRef<Arc<dyn Erased>, U>;
 
 /// Typedef of a mutable owning reference that uses an erased `Box` as the owner.
diff --git a/compiler/rustc_data_structures/src/profiling.rs b/compiler/rustc_data_structures/src/profiling.rs
index ef101c56ab5..0bbd0eda0c6 100644
--- a/compiler/rustc_data_structures/src/profiling.rs
+++ b/compiler/rustc_data_structures/src/profiling.rs
@@ -220,7 +220,7 @@ impl SelfProfilerRef {
         VerboseTimingGuard::start(message, self.generic_activity(event_label))
     }
 
-    /// Start profiling a extra verbose generic activity. Profiling continues until the
+    /// Start profiling an extra verbose generic activity. Profiling continues until the
     /// VerboseTimingGuard returned from this call is dropped. In addition to recording
     /// a measureme event, "extra verbose" generic activities also print a timing entry to
     /// stdout if the compiler is invoked with -Ztime-passes.
diff --git a/compiler/rustc_data_structures/src/sync.rs b/compiler/rustc_data_structures/src/sync.rs
index 722ce6b6367..f99ca53ab25 100644
--- a/compiler/rustc_data_structures/src/sync.rs
+++ b/compiler/rustc_data_structures/src/sync.rs
@@ -14,7 +14,7 @@
 //!
 //! `MTRef` is an immutable reference if cfg!(parallel_compiler), and a mutable reference otherwise.
 //!
-//! `rustc_erase_owner!` erases a OwningRef owner into Erased or Erased + Send + Sync
+//! `rustc_erase_owner!` erases an OwningRef owner into Erased or Erased + Send + Sync
 //! depending on the value of cfg!(parallel_compiler).
 
 use crate::owning_ref::{Erased, OwningRef};
diff --git a/compiler/rustc_data_structures/src/tiny_list.rs b/compiler/rustc_data_structures/src/tiny_list.rs
index f88bcc29481..9b07f86846e 100644
--- a/compiler/rustc_data_structures/src/tiny_list.rs
+++ b/compiler/rustc_data_structures/src/tiny_list.rs
@@ -5,7 +5,7 @@
 //!
 //! - If you have a list that rarely stores more than one element, then this
 //!   data-structure can store the element without allocating and only uses as
-//!   much space as a `Option<(T, usize)>`. If T can double as the `Option`
+//!   much space as an `Option<(T, usize)>`. If T can double as the `Option`
 //!   discriminant, it will even only be as large as `T, usize`.
 //!
 //! If you expect to store more than 1 element in the common case, steer clear