use field init shorthand EVERYWHERE
Like #43008 (f668999), but _much more aggressive_.
This commit is contained in:
@@ -135,7 +135,7 @@ impl PathSegment {
|
||||
pub fn crate_root(span: Span) -> Self {
|
||||
PathSegment {
|
||||
identifier: Ident { ctxt: span.ctxt, ..keywords::CrateRoot.ident() },
|
||||
span: span,
|
||||
span,
|
||||
parameters: None,
|
||||
}
|
||||
}
|
||||
@@ -1492,15 +1492,15 @@ impl Arg {
|
||||
let infer_ty = P(Ty {
|
||||
id: DUMMY_NODE_ID,
|
||||
node: TyKind::ImplicitSelf,
|
||||
span: span,
|
||||
span,
|
||||
});
|
||||
let arg = |mutbl, ty| Arg {
|
||||
pat: P(Pat {
|
||||
id: DUMMY_NODE_ID,
|
||||
node: PatKind::Ident(BindingMode::ByValue(mutbl), eself_ident, None),
|
||||
span: span,
|
||||
span,
|
||||
}),
|
||||
ty: ty,
|
||||
ty,
|
||||
id: DUMMY_NODE_ID,
|
||||
};
|
||||
match eself.node {
|
||||
@@ -1509,7 +1509,7 @@ impl Arg {
|
||||
SelfKind::Region(lt, mutbl) => arg(Mutability::Immutable, P(Ty {
|
||||
id: DUMMY_NODE_ID,
|
||||
node: TyKind::Rptr(lt, MutTy { ty: infer_ty, mutbl: mutbl }),
|
||||
span: span,
|
||||
span,
|
||||
})),
|
||||
}
|
||||
}
|
||||
@@ -1738,7 +1738,7 @@ impl PolyTraitRef {
|
||||
PolyTraitRef {
|
||||
bound_lifetimes: lifetimes,
|
||||
trait_ref: TraitRef { path: path, ref_id: DUMMY_NODE_ID },
|
||||
span: span,
|
||||
span,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user