File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class PathExpr;
4343// rust-path.h
4444class PathIdentSegment ;
4545struct GenericArgsBinding ;
46- struct GenericArgs ;
46+ class GenericArgs ;
4747class PathExprSegment ;
4848class PathPattern ;
4949class PathInExpression ;
Original file line number Diff line number Diff 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 ());
You can’t perform that action at this time.
0 commit comments