File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ pub struct TraitDefn {
142142 pub variable_kinds : Vec < VariableKind > ,
143143 pub where_clauses : Vec < QuantifiedWhereClause > ,
144144 pub assoc_ty_defns : Vec < AssocTyDefn > ,
145+ pub assoc_const_defns : Vec < AssocConstDefn > ,
145146 pub flags : TraitFlags ,
146147 pub well_known : Option < WellKnownTrait > ,
147148}
@@ -182,6 +183,12 @@ pub struct AssocTyDefn {
182183 pub where_clauses : Vec < QuantifiedWhereClause > ,
183184}
184185
186+ #[ derive( Clone , PartialEq , Eq , Debug ) ]
187+ pub struct AssocConstDefn {
188+ pub name : Identifier ,
189+ pub ty : Ty ,
190+ }
191+
185192#[ derive( Clone , PartialEq , Eq , Debug ) ]
186193pub struct OpaqueTyDefn {
187194 pub ty : Ty ,
Original file line number Diff line number Diff line change @@ -257,12 +257,13 @@ ClosureArgs: Vec<Ty> = {
257257
258258TraitDefn: TraitDefn = {
259259 <auto:AutoKeyword?> <marker:MarkerKeyword?> <upstream:UpstreamKeyword?> <fundamental:FundamentalKeyword?> <non_enumerable:NonEnumerableKeyword?> <coinductive:CoinductiveKeyword?> <object_safe:ObjectSafeKeyword?> <well_known:WellKnownTrait?> "trait" <n:Id><p:Angle<VariableKind>>
260- <w:QuantifiedWhereClauses> "{" <a:AssocTyDefn*> "}" => TraitDefn
260+ <w:QuantifiedWhereClauses> "{" <a:AssocTyDefn*> <ac:AssocConstDefn*> "}" => TraitDefn
261261 {
262262 name: n,
263263 variable_kinds: p,
264264 where_clauses: w,
265265 assoc_ty_defns: a,
266+ assoc_const_defns: ac,
266267 well_known,
267268 flags: TraitFlags {
268269 auto: auto.is_some(),
@@ -289,6 +290,15 @@ AssocTyDefn: AssocTyDefn = {
289290 }
290291};
291292
293+ AssocConstDefn: AssocConstDefn = {
294+ "const" <name:Id> ":" <ty:Ty> ";" => {
295+ AssocConstDefn {
296+ name: name,
297+ ty: ty,
298+ }
299+ }
300+ };
301+
292302OpaqueTyDefn: OpaqueTyDefn = {
293303 "opaque" "type" <name:Id> <p:Angle<VariableKind>> <b:(":" <Plus<QuantifiedInlineBound>>)?>
294304 <w:QuantifiedWhereClauses> "=" <ty:Ty> ";" => {
You can’t perform that action at this time.
0 commit comments