diff options
| author | varkor <github@varkor.com> | 2018-05-27 20:07:09 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2018-06-20 12:21:52 +0100 |
| commit | 3bcb006fd96763b24c34a8cf2abdf081d2e912b1 (patch) | |
| tree | 4531bf75371d131e2b14b4fcbd8de02aaeaa8b23 /src/libsyntax/ast.rs | |
| parent | f457b3d10aa2db4104402e2d04f72fab64a3c62e (diff) | |
| download | rust-3bcb006fd96763b24c34a8cf2abdf081d2e912b1.tar.gz rust-3bcb006fd96763b24c34a8cf2abdf081d2e912b1.zip | |
Rename structures in ast
Diffstat (limited to 'src/libsyntax/ast.rs')
| -rw-r--r-- | src/libsyntax/ast.rs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index c2626c70a42..f589057218c 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -160,7 +160,7 @@ impl GenericArgs { } #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] -pub enum GenericArgAST { +pub enum GenericArg { Lifetime(Lifetime), Type(P<Ty>), } @@ -171,7 +171,7 @@ pub struct AngleBracketedArgs { /// Overall span pub span: Span, /// The arguments for this path segment. - pub args: Vec<GenericArgAST>, + pub args: Vec<GenericArg>, /// Bindings (equality constraints) on associated types, if present. /// /// E.g., `Foo<A=Bar>`. @@ -299,7 +299,7 @@ pub enum TraitBoundModifier { pub type TyParamBounds = Vec<TyParamBound>; #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] -pub enum GenericParamKindAST { +pub enum GenericParamKind { /// A lifetime definition, e.g. `'a: 'b+'c+'d`. Lifetime { bounds: Vec<Lifetime>, @@ -312,19 +312,19 @@ pub enum GenericParamKindAST { } #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] -pub struct GenericParamAST { +pub struct GenericParam { pub ident: Ident, pub id: NodeId, pub attrs: ThinVec<Attribute>, - pub kind: GenericParamKindAST, + pub kind: GenericParamKind, } /// Represents lifetime, type and const parameters attached to a declaration of /// a function, enum, trait, etc. #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct Generics { - pub params: Vec<GenericParamAST>, + pub params: Vec<GenericParam>, pub where_clause: WhereClause, pub span: Span, } @@ -380,7 +380,7 @@ impl WherePredicate { pub struct WhereBoundPredicate { pub span: Span, /// Any generics from a `for` binding - pub bound_generic_params: Vec<GenericParamAST>, + pub bound_generic_params: Vec<GenericParam>, /// The type being bounded pub bounded_ty: P<Ty>, /// Trait and lifetime bounds (`Clone+Send+'static`) @@ -1512,7 +1512,7 @@ impl fmt::Debug for Ty { pub struct BareFnTy { pub unsafety: Unsafety, pub abi: Abi, - pub generic_params: Vec<GenericParamAST>, + pub generic_params: Vec<GenericParam>, pub decl: P<FnDecl> } @@ -1891,7 +1891,7 @@ pub struct TraitRef { #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)] pub struct PolyTraitRef { /// The `'a` in `<'a> Foo<&'a T>` - pub bound_generic_params: Vec<GenericParamAST>, + pub bound_generic_params: Vec<GenericParam>, /// The `Foo<&'a T>` in `<'a> Foo<&'a T>` pub trait_ref: TraitRef, @@ -1900,7 +1900,7 @@ pub struct PolyTraitRef { } impl PolyTraitRef { - pub fn new(generic_params: Vec<GenericParamAST>, path: Path, span: Span) -> Self { + pub fn new(generic_params: Vec<GenericParam>, path: Path, span: Span) -> Self { PolyTraitRef { bound_generic_params: generic_params, trait_ref: TraitRef { path: path, ref_id: DUMMY_NODE_ID }, |
