about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-22 16:20:58 +0200
committerFrank Steffahn <frank.steffahn@stu.uni-kiel.de>2021-08-22 16:35:29 +0200
commitbe9d2699ca3581448097ec446fecb45ec171975e (patch)
tree522778fd0a90cacd44bcf1161ce61dd143b4ef84 /compiler
parentbf88b113eab9c36e63f8461f5849138cb60d810a (diff)
Fix more “a”/“an” typos
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs2
-rw-r--r--compiler/rustc_codegen_llvm/src/intrinsic.rs2
-rw-r--r--compiler/rustc_data_structures/src/owning_ref/mod.rs2
-rw-r--r--compiler/rustc_mir/src/borrow_check/mod.rs2
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs2
-rw-r--r--compiler/rustc_serialize/src/json.rs4
6 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 2139f9776b7..07e1b55afe5 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -558,7 +558,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
 
     fn range_metadata(&mut self, load: &'ll Value, range: Range<u128>) {
         if self.sess().target.arch == "amdgpu" {
-            // amdgpu/LLVM does something weird and thinks a i64 value is
+            // amdgpu/LLVM does something weird and thinks an i64 value is
             // split into a v2i32, halving the bitwidth LLVM expects,
             // tripping an assertion. So, for now, just disable this
             // optimization.
diff --git a/compiler/rustc_codegen_llvm/src/intrinsic.rs b/compiler/rustc_codegen_llvm/src/intrinsic.rs
index fff2268596a..f7793c58a37 100644
--- a/compiler/rustc_codegen_llvm/src/intrinsic.rs
+++ b/compiler/rustc_codegen_llvm/src/intrinsic.rs
@@ -139,7 +139,7 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> {
                                 if self.cx().size_of(ret_ty).bytes() < 4 {
                                     // `va_arg` should not be called on an integer type
                                     // less than 4 bytes in length. If it is, promote
-                                    // the integer to a `i32` and truncate the result
+                                    // the integer to an `i32` and truncate the result
                                     // back to the smaller type.
                                     let promoted_result = emit_va_arg(self, args[0], tcx.types.i32);
                                     self.trunc(promoted_result, llret_ty)
diff --git a/compiler/rustc_data_structures/src/owning_ref/mod.rs b/compiler/rustc_data_structures/src/owning_ref/mod.rs
index 19b4426981c..5b27a407ad4 100644
--- a/compiler/rustc_data_structures/src/owning_ref/mod.rs
+++ b/compiler/rustc_data_structures/src/owning_ref/mod.rs
@@ -1148,7 +1148,7 @@ pub type StringRef = OwningRef<String, str>;
 
 /// Typedef of an owning reference that uses a `Rc` as the owner.
 pub type RcRef<T, U = T> = OwningRef<Rc<T>, U>;
-/// Typedef of an owning reference that uses a `Arc` as the owner.
+/// Typedef of an owning reference that uses an `Arc` as the owner.
 pub type ArcRef<T, U = T> = OwningRef<Arc<T>, U>;
 
 /// Typedef of an owning reference that uses a `Ref` as the owner.
diff --git a/compiler/rustc_mir/src/borrow_check/mod.rs b/compiler/rustc_mir/src/borrow_check/mod.rs
index 8e6ebd124ee..fa081adfb21 100644
--- a/compiler/rustc_mir/src/borrow_check/mod.rs
+++ b/compiler/rustc_mir/src/borrow_check/mod.rs
@@ -1889,7 +1889,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
                 ProjectionElem::Downcast(_/*adt_def*/, _/*variant_idx*/) =>
                 // assigning to (P->variant) is okay if assigning to `P` is okay
                 //
-                // FIXME: is this true even if P is a adt with a dtor?
+                // FIXME: is this true even if P is an adt with a dtor?
                 { }
 
                 // assigning to (*P) requires P to be initialized
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index a602a58e517..9d923599db7 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -1826,7 +1826,7 @@ impl<'tcx> LifetimeContext<'_, 'tcx> {
         err.emit();
     }
 
-    // FIXME(const_generics): This patches over a ICE caused by non-'static lifetimes in const
+    // FIXME(const_generics): This patches over an ICE caused by non-'static lifetimes in const
     // generics. We are disallowing this until we can decide on how we want to handle non-'static
     // lifetimes in const generics. See issue #74052 for discussion.
     crate fn emit_non_static_lt_in_const_generic_error(&self, lifetime_ref: &hir::Lifetime) {
diff --git a/compiler/rustc_serialize/src/json.rs b/compiler/rustc_serialize/src/json.rs
index 4d213207fb6..e5369b4bbfd 100644
--- a/compiler/rustc_serialize/src/json.rs
+++ b/compiler/rustc_serialize/src/json.rs
@@ -1202,7 +1202,7 @@ impl Json {
         matches!(*self, Json::I64(_) | Json::U64(_) | Json::F64(_))
     }
 
-    /// Returns `true` if the Json value is a `i64`.
+    /// Returns `true` if the Json value is an `i64`.
     pub fn is_i64(&self) -> bool {
         matches!(*self, Json::I64(_))
     }
@@ -1217,7 +1217,7 @@ impl Json {
         matches!(*self, Json::F64(_))
     }
 
-    /// If the Json value is a number, returns or cast it to a `i64`;
+    /// If the Json value is a number, returns or cast it to an `i64`;
     /// returns `None` otherwise.
     pub fn as_i64(&self) -> Option<i64> {
         match *self {