diff options
| author | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 14:46:15 +0200 | 
|---|---|---|
| committer | Frank Steffahn <frank.steffahn@stu.uni-kiel.de> | 2021-08-22 15:35:11 +0200 | 
| commit | bf88b113eab9c36e63f8461f5849138cb60d810a (patch) | |
| tree | f333d6f75d1ec09c17554a69c6420ced3203adf2 /compiler/rustc_middle | |
| parent | 2ad56d5c9031636c1509f4417e88099a49405b4e (diff) | |
| download | rust-bf88b113eab9c36e63f8461f5849138cb60d810a.tar.gz rust-bf88b113eab9c36e63f8461f5849138cb60d810a.zip | |
Fix typos “a”→“an”
Diffstat (limited to 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/hir/map/blocks.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/middle/region.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/error.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/mir/interpret/value.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/traits/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/traits/select.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/adt.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/inhabitedness/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/mod.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/subst.rs | 6 | 
13 files changed, 19 insertions, 19 deletions
| diff --git a/compiler/rustc_middle/src/hir/map/blocks.rs b/compiler/rustc_middle/src/hir/map/blocks.rs index 706c7900949..8efec8ef567 100644 --- a/compiler/rustc_middle/src/hir/map/blocks.rs +++ b/compiler/rustc_middle/src/hir/map/blocks.rs @@ -63,7 +63,7 @@ impl MaybeFnLike for hir::Expr<'_> { } } -/// Carries either an FnLikeNode or a Expr, as these are the two +/// Carries either an FnLikeNode or an Expr, as these are the two /// constructs that correspond to "code" (as in, something from which /// we can construct a control-flow graph). #[derive(Copy, Clone)] diff --git a/compiler/rustc_middle/src/middle/region.rs b/compiler/rustc_middle/src/middle/region.rs index f44267a404b..00c6a2aa989 100644 --- a/compiler/rustc_middle/src/middle/region.rs +++ b/compiler/rustc_middle/src/middle/region.rs @@ -151,7 +151,7 @@ rustc_index::newtype_index! { static_assert_size!(ScopeData, 4); impl Scope { - /// Returns a item-local ID associated with this scope. + /// Returns an item-local ID associated with this scope. /// /// N.B., likely to be replaced as API is refined; e.g., pnkfelix /// anticipates `fn entry_node_id` and `fn each_exit_node_id`. diff --git a/compiler/rustc_middle/src/mir/interpret/error.rs b/compiler/rustc_middle/src/mir/interpret/error.rs index 4826c96000c..5d17bb9b15f 100644 --- a/compiler/rustc_middle/src/mir/interpret/error.rs +++ b/compiler/rustc_middle/src/mir/interpret/error.rs @@ -46,7 +46,7 @@ static_assert_size!(InterpErrorInfo<'_>, 8); /// Packages the kind of error we got from the const code interpreter /// up with a Rust-level backtrace of where the error occurred. /// These should always be constructed by calling `.into()` on -/// a `InterpError`. In `rustc_mir::interpret`, we have `throw_err_*` +/// an `InterpError`. In `rustc_mir::interpret`, we have `throw_err_*` /// macros for this. #[derive(Debug)] pub struct InterpErrorInfo<'tcx>(Box<InterpErrorInfoInner<'tcx>>); diff --git a/compiler/rustc_middle/src/mir/interpret/value.rs b/compiler/rustc_middle/src/mir/interpret/value.rs index 62b71b10d5a..1783a40e126 100644 --- a/compiler/rustc_middle/src/mir/interpret/value.rs +++ b/compiler/rustc_middle/src/mir/interpret/value.rs @@ -17,7 +17,7 @@ use super::{ /// Represents the result of const evaluation via the `eval_to_allocation` query. #[derive(Copy, Clone, HashStable, TyEncodable, TyDecodable, Debug, Hash, Eq, PartialEq)] pub struct ConstAlloc<'tcx> { - // the value lives here, at offset 0, and that allocation definitely is a `AllocKind::Memory` + // the value lives here, at offset 0, and that allocation definitely is an `AllocKind::Memory` // (so you can use `AllocMap::unwrap_memory`). pub alloc_id: AllocId, pub ty: Ty<'tcx>, @@ -113,7 +113,7 @@ impl<'tcx> ConstValue<'tcx> { } /// A `Scalar` represents an immediate, primitive value existing outside of a -/// `memory::Allocation`. It is in many ways like a small chunk of a `Allocation`, up to 16 bytes in +/// `memory::Allocation`. It is in many ways like a small chunk of an `Allocation`, up to 16 bytes in /// size. Like a range of bytes in an `Allocation`, a `Scalar` can either represent the raw bytes /// of a simple value or a pointer into another `Allocation` /// diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index 469da858ccf..457e80c1663 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -509,7 +509,7 @@ pub enum ImplSource<'tcx, N> { TraitUpcasting(ImplSourceTraitUpcastingData<'tcx, N>), /// ImplSource automatically generated for a closure. The `DefId` is the ID - /// of the closure expression. This is a `ImplSource::UserDefined` in spirit, but the + /// of the closure expression. This is an `ImplSource::UserDefined` in spirit, but the /// impl is generated by the compiler and does not appear in the source. Closure(ImplSourceClosureData<'tcx, N>), diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 3b7c201f3ee..62996bf4cbe 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -111,7 +111,7 @@ pub enum SelectionCandidate<'tcx> { ProjectionCandidate(usize), /// Implementation of a `Fn`-family trait by one of the anonymous types - /// generated for a `||` expression. + /// generated for an `||` expression. ClosureCandidate, /// Implementation of a `Generator` trait by one of the anonymous types diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs index 95159ea46ae..27927bcca72 100644 --- a/compiler/rustc_middle/src/ty/adt.rs +++ b/compiler/rustc_middle/src/ty/adt.rs @@ -209,7 +209,7 @@ impl<'tcx> AdtDef { self.flags.contains(AdtFlags::IS_UNION) } - /// Returns `true` if this is a enum. + /// Returns `true` if this is an enum. #[inline] pub fn is_enum(&self) -> bool { self.flags.contains(AdtFlags::IS_ENUM) diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 106b443ee3c..28e894c5cae 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -1792,7 +1792,7 @@ pub mod tls { if context == 0 { f(None) } else { - // We could get a `ImplicitCtxt` pointer from another thread. + // We could get an `ImplicitCtxt` pointer from another thread. // Ensure that `ImplicitCtxt` is `Sync`. sync::assert_sync::<ImplicitCtxt<'_, '_>>(); diff --git a/compiler/rustc_middle/src/ty/inhabitedness/mod.rs b/compiler/rustc_middle/src/ty/inhabitedness/mod.rs index 119cb135046..77d82ee6eae 100644 --- a/compiler/rustc_middle/src/ty/inhabitedness/mod.rs +++ b/compiler/rustc_middle/src/ty/inhabitedness/mod.rs @@ -9,7 +9,7 @@ use crate::ty::{DefId, SubstsRef}; mod def_id_forest; -// The methods in this module calculate `DefIdForest`s of modules in which a +// The methods in this module calculate `DefIdForest`s of modules in which an // `AdtDef`/`VariantDef`/`FieldDef` is visibly uninhabited. // // # Example diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index 3caca313ffd..80c99872dd7 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -2571,14 +2571,14 @@ where /// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers. /// /// NB: this doesn't handle virtual calls - those should use `FnAbi::of_instance` - /// instead, where the instance is a `InstanceDef::Virtual`. + /// instead, where the instance is an `InstanceDef::Virtual`. fn of_fn_ptr(cx: &C, sig: ty::PolyFnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self; /// Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for /// direct calls to an `fn`. /// /// NB: that includes virtual calls, which are represented by "direct calls" - /// to a `InstanceDef::Virtual` instance (of `<dyn Trait as Trait>::fn`). + /// to an `InstanceDef::Virtual` instance (of `<dyn Trait as Trait>::fn`). fn of_instance(cx: &C, instance: ty::Instance<'tcx>, extra_args: &[Ty<'tcx>]) -> Self; fn new_internal( diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs index 9fcf35b7320..62e093581b8 100644 --- a/compiler/rustc_middle/src/ty/mod.rs +++ b/compiler/rustc_middle/src/ty/mod.rs @@ -865,7 +865,7 @@ impl<'tcx> Predicate<'tcx> { /// Represents the bounds declared on a particular set of type /// parameters. Should eventually be generalized into a flag list of -/// where-clauses. You can obtain a `InstantiatedPredicates` list from a +/// where-clauses. You can obtain an `InstantiatedPredicates` list from a /// `GenericPredicates` by using the `instantiate` method. Note that this method /// reflects an important semantic invariant of `InstantiatedPredicates`: while /// the `GenericPredicates` are expressed in terms of the bound type @@ -1371,7 +1371,7 @@ bitflags! { } } -/// Definition of a variant -- a struct's fields or a enum variant. +/// Definition of a variant -- a struct's fields or an enum variant. #[derive(Debug, HashStable)] pub struct VariantDef { /// `DefId` that identifies the variant itself. diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index a1edb8071c4..b8dae502d7a 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -1323,7 +1323,7 @@ pub type Region<'tcx> = &'tcx RegionKind; /// These are regions that are stored behind a binder and must be substituted /// with some concrete region before being used. There are two kind of /// bound regions: early-bound, which are bound in an item's `Generics`, -/// and are substituted by a `InternalSubsts`, and late-bound, which are part of +/// and are substituted by an `InternalSubsts`, and late-bound, which are part of /// higher-ranked types (e.g., `for<'a> fn(&'a ())`), and are substituted by /// the likes of `liberate_late_bound_regions`. The distinction exists /// because higher-ranked lifetimes aren't supported in all places. See [1][2]. @@ -1471,7 +1471,7 @@ pub type PolyExistentialProjection<'tcx> = Binder<'tcx, ExistentialProjection<'t impl<'tcx> ExistentialProjection<'tcx> { /// Extracts the underlying existential trait reference from this projection. /// For example, if this is a projection of `exists T. <T as Iterator>::Item == X`, - /// then this function would return a `exists T. T: Iterator` existential trait + /// then this function would return an `exists T. T: Iterator` existential trait /// reference. pub fn trait_ref(&self, tcx: TyCtxt<'tcx>) -> ty::ExistentialTraitRef<'tcx> { let def_id = tcx.associated_item(self.item_def_id).container.id(); diff --git a/compiler/rustc_middle/src/ty/subst.rs b/compiler/rustc_middle/src/ty/subst.rs index 9b8d22d8eaf..4fbb4d1806f 100644 --- a/compiler/rustc_middle/src/ty/subst.rs +++ b/compiler/rustc_middle/src/ty/subst.rs @@ -22,7 +22,7 @@ use std::ops::ControlFlow; /// An entity in the Rust type system, which can be one of /// several kinds (types, lifetimes, and consts). -/// To reduce memory usage, a `GenericArg` is a interned pointer, +/// To reduce memory usage, a `GenericArg` is an interned pointer, /// with the lowest 2 bits being reserved for a tag to /// indicate the type (`Ty`, `Region`, or `Const`) it points to. #[derive(Copy, Clone, PartialEq, Eq, Hash)] @@ -204,12 +204,12 @@ impl<'a, 'tcx> InternalSubsts<'tcx> { GeneratorSubsts { substs: self } } - /// Creates a `InternalSubsts` that maps each generic parameter to itself. + /// Creates an `InternalSubsts` that maps each generic parameter to itself. pub fn identity_for_item(tcx: TyCtxt<'tcx>, def_id: DefId) -> SubstsRef<'tcx> { Self::for_item(tcx, def_id, |param, _| tcx.mk_param_from_def(param)) } - /// Creates a `InternalSubsts` for generic parameter definitions, + /// Creates an `InternalSubsts` for generic parameter definitions, /// by calling closures to obtain each kind. /// The closures get to observe the `InternalSubsts` as they're /// being built, which can be used to correctly | 
