Skip to content

Commit e63de69

Browse files
committed
x
1 parent 067cc30 commit e63de69

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

gcc/rust/hir/tree/rust-hir-full-decls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PathExpr;
4343
// rust-path.h
4444
class PathIdentSegment;
4545
struct GenericArgsBinding;
46-
struct GenericArgs;
46+
class GenericArgs;
4747
class PathExprSegment;
4848
class PathPattern;
4949
class PathInExpression;

gcc/rust/hir/tree/rust-hir-path.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ class ConstGenericArg
140140
Location locus;
141141
};
142142

143-
// Generic arguments allowed in each path expression segment - inline?
144-
struct GenericArgs
143+
class GenericArgs
145144
{
146145
std::vector<Lifetime> lifetime_args;
147146
std::vector<std::unique_ptr<Type> > type_args;
@@ -172,6 +171,7 @@ struct GenericArgs
172171
: lifetime_args (other.lifetime_args), binding_args (other.binding_args),
173172
const_args (other.const_args), locus (other.locus)
174173
{
174+
type_args.clear ();
175175
type_args.reserve (other.type_args.size ());
176176

177177
for (const auto &e : other.type_args)
@@ -188,6 +188,7 @@ struct GenericArgs
188188
const_args = other.const_args;
189189
locus = other.locus;
190190

191+
type_args.clear ();
191192
type_args.reserve (other.type_args.size ());
192193
for (const auto &e : other.type_args)
193194
type_args.push_back (e->clone_type ());

0 commit comments

Comments
 (0)