File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -251,13 +251,13 @@ AssocTyDefn: AssocTyDefn = {
251
251
};
252
252
253
253
OpaqueTyDefn: OpaqueTyDefn = {
254
- "opaque" "type" <name:Id> <p:Angle<VariableKind>> ":" <b: Plus<QuantifiedInlineBound>>
254
+ "opaque" "type" <name:Id> <p:Angle<VariableKind>> <b:( ":" <Plus<QuantifiedInlineBound>>)? >
255
255
<w:QuantifiedWhereClauses> "=" <ty:Ty> ";" => {
256
256
OpaqueTyDefn {
257
257
ty,
258
258
variable_kinds: p,
259
259
name,
260
- bounds: b,
260
+ bounds: b.unwrap_or(vec![]) ,
261
261
where_clauses: w,
262
262
}
263
263
}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ fn test_basic_const_values_in_opaque_ty_values() {
40
40
reparse_test ! (
41
41
program {
42
42
struct Foo <const N > { }
43
- opaque type Zed : = Foo <0 >;
43
+ opaque type Zed = Foo <0 >;
44
44
}
45
45
) ;
46
46
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ fn test_opaque_ty_with_fn_def() {
41
41
// Test printing opaque types in function definitions
42
42
reparse_test ! (
43
43
program {
44
- opaque type Bar : = ( ) ;
44
+ opaque type Bar = ( ) ;
45
45
fn gives_bar( ) -> Bar ;
46
46
fn receives_bar( param: Bar ) -> ( ) ;
47
47
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ fn opaque_ty_no_bounds() {
23
23
// Test printing opaque types without any bounds
24
24
reparse_test ! (
25
25
program {
26
- opaque type Foo : = ( ) ;
26
+ opaque type Foo = ( ) ;
27
27
}
28
28
) ;
29
29
}
You can’t perform that action at this time.
0 commit comments