summaryrefslogtreecommitdiff
path: root/src/ast/generics.hpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-20 17:00:29 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-20 17:00:29 +0800
commit5ae0c86b33d218c05ce91afe73608c5e9f1bd61c (patch)
treeb69cfc8b545b018085b46ac52241a2f62d89434c /src/ast/generics.hpp
parente271a7ad8e6cbc2cf70880a244424bc15ebb8094 (diff)
downloadmrust-5ae0c86b33d218c05ce91afe73608c5e9f1bd61c.tar.gz
AST - Remove unused AST serialisation code
Diffstat (limited to 'src/ast/generics.hpp')
-rw-r--r--src/ast/generics.hpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ast/generics.hpp b/src/ast/generics.hpp
index d3c1ba18..0209ccbb 100644
--- a/src/ast/generics.hpp
+++ b/src/ast/generics.hpp
@@ -6,8 +6,7 @@
namespace AST {
-class TypeParam:
- public Serialisable
+class TypeParam
{
::std::string m_name;
TypeRef m_default;
@@ -22,15 +21,14 @@ public:
}
const ::std::string& name() const { return m_name; }
- const TypeRef& get_default() const { return m_default; }
- TypeRef& get_default() { return m_default; }
+ const TypeRef& get_default() const { return m_default; }
+ TypeRef& get_default() { return m_default; }
friend ::std::ostream& operator<<(::std::ostream& os, const TypeParam& tp);
- SERIALISABLE_PROTOTYPES();
};
-TAGGED_UNION_EX( GenericBound, (: public Serialisable), Lifetime,
+TAGGED_UNION_EX( GenericBound, (), Lifetime,
(
// Lifetime bound: 'test must be valid for 'bound
(Lifetime, struct {
@@ -68,7 +66,6 @@ TAGGED_UNION_EX( GenericBound, (: public Serialisable), Lifetime,
(, span(x.span) ), ( span = x.span; ),
(
public:
- SERIALISABLE_PROTOTYPES();
Span span;
@@ -88,8 +85,7 @@ TAGGED_UNION_EX( GenericBound, (: public Serialisable), Lifetime,
::std::ostream& operator<<(::std::ostream& os, const GenericBound& x);
-class GenericParams:
- public Serialisable
+class GenericParams
{
::std::vector<TypeParam> m_type_params;
::std::vector< ::std::string > m_lifetime_params;
@@ -118,10 +114,10 @@ public:
}
const ::std::vector<TypeParam>& ty_params() const { return m_type_params; }
+ ::std::vector<TypeParam>& ty_params() { return m_type_params; }
const ::std::vector< ::std::string>& lft_params() const { return m_lifetime_params; }
const ::std::vector<GenericBound>& bounds() const { return m_bounds; }
- ::std::vector<TypeParam>& ty_params() { return m_type_params; }
- ::std::vector<GenericBound>& bounds() { return m_bounds; }
+ ::std::vector<GenericBound>& bounds() { return m_bounds; }
void add_ty_param(TypeParam param) { m_type_params.push_back( ::std::move(param) ); }
void add_lft_param(::std::string name) { m_lifetime_params.push_back( ::std::move(name) ); }
@@ -134,7 +130,6 @@ public:
bool check_params(Crate& crate, ::std::vector<TypeRef>& types, bool allow_infer) const;
friend ::std::ostream& operator<<(::std::ostream& os, const GenericParams& tp);
- SERIALISABLE_PROTOTYPES();
};