X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibsyntax%2Fast.rs;h=4e6641f4c50ed88c76d6bf161e616f81b161f54f;hb=6f4ab9458a7ad06c8ce630604f533c8c0c0acef4;hp=857d9a753cc4e8c9de9181d26176e3392a97b04e;hpb=640cfc852ae17d51a2f5e75fcae9a93431a3b38c;p=rust.git diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 857d9a753cc..4e6641f4c50 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -135,7 +135,7 @@ pub fn from_ident(ident: Ident, span: Span) -> Self { pub fn crate_root(span: Span) -> Self { PathSegment { identifier: Ident { ctxt: span.ctxt, ..keywords::CrateRoot.ident() }, - span: span, + span, parameters: None, } } @@ -563,8 +563,8 @@ pub enum PatKind { TupleStruct(Path, Vec>, Option), /// A possibly qualified path pattern. - /// Unquailfied path patterns `A::B::C` can legally refer to variants, structs, constants - /// or associated constants. Quailfied path patterns `::B::C`/`::B::C` can + /// Unqualified path patterns `A::B::C` can legally refer to variants, structs, constants + /// or associated constants. Qualified path patterns `::B::C`/`::B::C` can /// only legally refer to associated constants. Path(Option, Path), @@ -1492,15 +1492,15 @@ pub fn from_self(eself: ExplicitSelf, eself_ident: SpannedIdent) -> 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 @@ pub fn from_self(eself: ExplicitSelf, eself_ident: SpannedIdent) -> 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 @@ pub fn new(lifetimes: Vec, path: Path, span: Span) -> Self { PolyTraitRef { bound_lifetimes: lifetimes, trait_ref: TraitRef { path: path, ref_id: DUMMY_NODE_ID }, - span: span, + span, } } } @@ -1838,7 +1838,7 @@ pub struct Item { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub enum ItemKind { - /// An`extern crate` item, with optional original crate name. + /// An `extern crate` item, with optional original crate name. /// /// E.g. `extern crate foo` or `extern crate foo_bar as foo` ExternCrate(Option),