File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -1947,6 +1947,10 @@ pub(crate) fn rewrite_struct_field(
19471947 if contains_skip ( & field. attrs ) {
19481948 return Ok ( context. snippet ( field. span ( ) ) . to_owned ( ) ) ;
19491949 }
1950+ // FIXME(default_field_values): Implement formatting.
1951+ if field. default . is_some ( ) {
1952+ return Err ( RewriteError :: SkipFormatting ) ;
1953+ }
19501954
19511955 let type_annotation_spacing = type_annotation_spacing ( context. config ) ;
19521956 let prefix = rewrite_struct_field_prefix ( context, field) ?;
Original file line number Diff line number Diff line change 1+ // Test for now that nightly default field values are left alone for now.
2+
3+ struct Foo {
4+ default_field : Spacing = /* uwu */ 0 ,
5+ }
6+
7+ a_macro ! (
8+ struct Foo2 {
9+ default_field: Spacing = /* uwu */ 0 ,
10+ }
11+ ) ;
Original file line number Diff line number Diff line change 1+ // Test for now that nightly default field values are left alone for now.
2+
3+ struct Foo {
4+ default_field : Spacing = /* uwu */ 0 ,
5+ }
6+
7+ a_macro ! (
8+ struct Foo2 {
9+ default_field: Spacing = /* uwu */ 0 ,
10+ }
11+ ) ;
You can’t perform that action at this time.
0 commit comments