chore: Fix typos in 'compiler' (batch 1)
This commit is contained in:
parent
78d5c04d9c
commit
ac69544a17
35 changed files with 44 additions and 44 deletions
|
@ -1016,7 +1016,7 @@ fn check_param_wf(tcx: TyCtxt<'_>, param: &hir::GenericParam<'_>) -> Result<(),
|
|||
sym::adt_const_params,
|
||||
)])
|
||||
}
|
||||
// Implments `ConstParamTy`, suggest adding the feature to enable.
|
||||
// Implements `ConstParamTy`, suggest adding the feature to enable.
|
||||
Ok(..) => Some(vec![(adt_const_params_feature_string, sym::adt_const_params)]),
|
||||
};
|
||||
if let Some(features) = may_suggest_feature {
|
||||
|
|
|
@ -219,7 +219,7 @@ fn visit_implementation_of_dispatch_from_dyn(checker: &Checker<'_>) -> Result<()
|
|||
// Later parts of the compiler rely on all DispatchFromDyn types to be ABI-compatible with raw
|
||||
// pointers. This is enforced here: we only allow impls for references, raw pointers, and things
|
||||
// that are effectively repr(transparent) newtypes around types that already hav a
|
||||
// DispatchedFromDyn impl. We cannot literally use repr(transparent) on those tpyes since some
|
||||
// DispatchedFromDyn impl. We cannot literally use repr(transparent) on those types since some
|
||||
// of them support an allocator, but we ensure that for the cases where the type implements this
|
||||
// trait, they *do* satisfy the repr(transparent) rules, and then we assume that everything else
|
||||
// in the compiler (in particular, all the call ABI logic) will treat them as repr(transparent)
|
||||
|
|
|
@ -1037,7 +1037,7 @@ impl<'tcx> FieldUniquenessCheckContext<'tcx> {
|
|||
|
||||
/// Check the uniqueness of fields in a struct variant, and recursively
|
||||
/// check the nested fields if it is an unnamed field with type of an
|
||||
/// annoymous adt.
|
||||
/// anonymous adt.
|
||||
fn check_field(&mut self, field: &hir::FieldDef<'_>) {
|
||||
if field.ident.name != kw::Underscore {
|
||||
self.check_field_decl(field.ident, field.span.into());
|
||||
|
@ -1491,7 +1491,7 @@ fn infer_return_ty_for_fn_sig<'tcx>(
|
|||
Some(ty) => {
|
||||
let fn_sig = tcx.typeck(def_id).liberated_fn_sigs()[hir_id];
|
||||
// Typeck doesn't expect erased regions to be returned from `type_of`.
|
||||
// This is a heuristic approach. If the scope has region paramters,
|
||||
// This is a heuristic approach. If the scope has region parameters,
|
||||
// we should change fn_sig's lifetime from `ReErased` to `ReError`,
|
||||
// otherwise to `ReStatic`.
|
||||
let has_region_params = generics.params.iter().any(|param| match param.kind {
|
||||
|
|
|
@ -529,7 +529,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
|||
|
||||
/// Detect and reject early-bound & escaping late-bound generic params in the type of assoc const bindings.
|
||||
///
|
||||
/// FIXME(const_generics): This is a temporary and semi-artifical restriction until the
|
||||
/// FIXME(const_generics): This is a temporary and semi-artificial restriction until the
|
||||
/// arrival of *generic const generics*[^1].
|
||||
///
|
||||
/// It might actually be possible that we can already support early-bound generic params
|
||||
|
|
|
@ -986,7 +986,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
|||
/// We **don't** support paths whose self type is an arbitrary type like `Struct::Ty` where
|
||||
/// struct `Struct` impls an in-scope trait that defines an associated type called `Ty`.
|
||||
/// For the latter case, we report ambiguity.
|
||||
/// While desirable to support, the implemention would be non-trivial. Tracked in [#22519].
|
||||
/// While desirable to support, the implementation would be non-trivial. Tracked in [#22519].
|
||||
///
|
||||
/// At the time of writing, *inherent associated types* are also resolved here. This however
|
||||
/// is [problematic][iat]. A proper implementation would be as non-trivial as the one
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue