X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_hir%2Fsrc%2Fhir.rs;h=8bc022e1e178e19b50698104254dad839b950461;hb=9af48e5ab6a9eab1c966d78355513469514e16db;hp=118eafe2910f0a8f504247c3a6f345b8ef1bcad0;hpb=11663b1b4857ffeafbd85a9a36c234d117373b76;p=rust.git diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 118eafe2910..8bc022e1e17 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -827,7 +827,7 @@ pub fn get(&self, id: ItemLocalId) -> &'tcx [Attribute] { pub struct OwnerNodes<'tcx> { /// Pre-computed hash of the full HIR. pub hash_including_bodies: Fingerprint, - /// Pre-computed hash of the item signature, sithout recursing into the body. + /// Pre-computed hash of the item signature, without recursing into the body. pub hash_without_bodies: Fingerprint, /// Full HIR for the current owner. // The zeroth node's parent should never be accessed: the owner's parent is computed by the @@ -943,7 +943,10 @@ pub struct Closure<'hir> { pub bound_generic_params: &'hir [GenericParam<'hir>], pub fn_decl: &'hir FnDecl<'hir>, pub body: BodyId, + /// The span of the declaration block: 'move |...| -> ...' pub fn_decl_span: Span, + /// The span of the argument block `|...|` + pub fn_arg_span: Option, pub movability: Option, } @@ -2434,7 +2437,7 @@ pub fn as_generic_param(&self) -> Option<(DefId, Ident)> { pub fn peel_refs(&self) -> &Self { let mut final_ty = self; while let TyKind::Rptr(_, MutTy { ty, .. }) = &final_ty.kind { - final_ty = &ty; + final_ty = ty; } final_ty }