aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-03-14 18:52:50 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-03-15 10:23:29 +0000
commit7ef3277cb26efeeafe51d140aef5558ec9bcaca0 (patch)
treedb89b5cf2877ce5e0190fd11f38d6384c0ca0edc /gcc/rust/hir
parent26e4aa3cd57f9e36b7c6404fab6f0ace1e5e3576 (diff)
downloadgcc-7ef3277cb26efeeafe51d140aef5558ec9bcaca0.zip
gcc-7ef3277cb26efeeafe51d140aef5558ec9bcaca0.tar.gz
gcc-7ef3277cb26efeeafe51d140aef5558ec9bcaca0.tar.bz2
Convert structs to classes
gcc/rust/ChangeLog: * hir/tree/rust-hir-full-decls.h (struct GenericArgsBinding): Convert to class. (class GenericArgsBinding): Convert from struct. (struct TypePathFunction): See above. (class TypePathFunction): See above. (struct QualifiedPathType): See above. (class QualifiedPathType): See above. * ast/rust-ast-full-decls.h (struct WhereClause): See above. (class WhereClause): See above. (struct SelfParam): See above. (class SelfParam): See above. (struct FunctionQualifiers): See above. (class FunctionQualifiers): See above. (struct FunctionParam): See above. (class FunctionParam): See above. (struct StructField): See above. (class StructField): See above. (struct TupleField): See above. (class TupleField): See above. (struct TraitFunctionDecl): See above. (class TraitFunctionDecl): See above. (struct TraitMethodDecl): See above. (class TraitMethodDecl): See above. (struct NamedFunctionParam): See above. (class NamedFunctionParam): See above. * hir/tree/rust-hir-path.h (struct GenericArgsBinding): See above. (class GenericArgsBinding): See above. (struct TypePathFunction): See above. (class TypePathFunction): See above. (struct QualifiedPathType): See above. (class QualifiedPathType): See above. * ast/rust-item.h (struct WhereClause): See above. (class WhereClause): See above. (struct SelfParam): See above. (class SelfParam): See above. (struct FunctionQualifiers): See above. (class FunctionQualifiers): See above. (struct FunctionParam): See above. (class FunctionParam): See above. (struct StructField): See above. (class StructField): See above. (struct TupleField): See above. (class TupleField): See above. (struct TraitFunctionDecl): See above. (class TraitFunctionDecl): See above. (struct TraitMethodDecl): See above. (class TraitMethodDecl): See above. (struct NamedFunctionParam): See above. (class NamedFunctionParam): See above. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/hir')
-rw-r--r--gcc/rust/hir/tree/rust-hir-full-decls.h6
-rw-r--r--gcc/rust/hir/tree/rust-hir-path.h9
2 files changed, 6 insertions, 9 deletions
diff --git a/gcc/rust/hir/tree/rust-hir-full-decls.h b/gcc/rust/hir/tree/rust-hir-full-decls.h
index e49888c..5e35666 100644
--- a/gcc/rust/hir/tree/rust-hir-full-decls.h
+++ b/gcc/rust/hir/tree/rust-hir-full-decls.h
@@ -45,17 +45,17 @@ class PathExpr;
// rust-path.h
class PathIdentSegment;
-struct GenericArgsBinding;
+class GenericArgsBinding;
class GenericArgs;
class PathExprSegment;
class PathPattern;
class PathInExpression;
class TypePathSegment;
class TypePathSegmentGeneric;
-struct TypePathFunction;
+class TypePathFunction;
class TypePathSegmentFunction;
class TypePath;
-struct QualifiedPathType;
+class QualifiedPathType;
class QualifiedPathInExpression;
class QualifiedPathInType;
diff --git a/gcc/rust/hir/tree/rust-hir-path.h b/gcc/rust/hir/tree/rust-hir-path.h
index f8a7dab..88d0ff9 100644
--- a/gcc/rust/hir/tree/rust-hir-path.h
+++ b/gcc/rust/hir/tree/rust-hir-path.h
@@ -53,9 +53,8 @@ public:
};
// A binding of an identifier to a type used in generic arguments in paths
-struct GenericArgsBinding
+class GenericArgsBinding
{
-private:
Identifier identifier;
std::unique_ptr<Type> type;
@@ -547,9 +546,8 @@ public:
};
// A function as represented in a type path
-struct TypePathFunction
+class TypePathFunction
{
-private:
std::vector<std::unique_ptr<Type> > inputs;
std::unique_ptr<Type> return_type;
@@ -761,9 +759,8 @@ public:
}
};
-struct QualifiedPathType
+class QualifiedPathType
{
-private:
std::unique_ptr<Type> type;
std::unique_ptr<TypePath> trait;
Location locus;