Skip to content

Commit ca3057f

Browse files
committed
Bless all pretty printer tests and ui tests
1 parent 40fcbba commit ca3057f

File tree

5 files changed

+23
-22
lines changed

5 files changed

+23
-22
lines changed

src/test/pretty/ast-stmt-expr-attr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ fn syntax() {
119119
let _ = #[attr] foo![#! [attr]];
120120
let _ = #[attr] foo! {};
121121
let _ = #[attr] foo! { #! [attr] };
122-
let _ = #[attr] Foo{bar: baz,};
123-
let _ = #[attr] Foo{..foo};
124-
let _ = #[attr] Foo{bar: baz, ..foo};
122+
let _ = #[attr] Foo { bar: baz };
123+
let _ = #[attr] Foo { ..foo };
124+
let _ = #[attr] Foo { bar: baz, ..foo };
125125
let _ = #[attr] (0);
126126

127127
{

src/test/pretty/issue-68710-field-attr-proc-mac-lost.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ struct C {
88

99
#[allow()]
1010
const C: C =
11-
C{
11+
C {
1212
#[cfg(debug_assertions)]
1313
field: 0,
1414

1515
#[cfg(not(debug_assertions))]
16-
field: 1,};
16+
field: 1,
17+
};

src/test/pretty/stmt_expr_attributes.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ struct Bar(());
9090
fn _7() {
9191

9292
#[rustc_dummy]
93-
Foo{data: (),};
93+
Foo { data: () };
9494

95-
let _ = #[rustc_dummy] Foo{data: (),};
95+
let _ = #[rustc_dummy] Foo { data: () };
9696
}
9797

9898
fn _8() {
@@ -209,7 +209,7 @@ fn _11() {
209209
let mut x = 0;
210210
let _ = #[rustc_dummy] x = 15;
211211
let _ = #[rustc_dummy] x += 15;
212-
let s = Foo{data: (),};
212+
let s = Foo { data: () };
213213
let _ = #[rustc_dummy] s.data;
214214
let _ = (#[rustc_dummy] s).data;
215215
let t = Bar(());
@@ -235,9 +235,9 @@ fn _11() {
235235
let _ = #[rustc_dummy] expr_mac!();
236236
let _ = #[rustc_dummy] expr_mac![];
237237
let _ = #[rustc_dummy] expr_mac! {};
238-
let _ = #[rustc_dummy] Foo{data: (),};
239-
let _ = #[rustc_dummy] Foo{..s};
240-
let _ = #[rustc_dummy] Foo{data: (), ..s};
238+
let _ = #[rustc_dummy] Foo { data: () };
239+
let _ = #[rustc_dummy] Foo { ..s };
240+
let _ = #[rustc_dummy] Foo { data: (), ..s };
241241
let _ = #[rustc_dummy] (0);
242242
}
243243

src/test/ui/macros/stringify.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -315,17 +315,17 @@ fn test_expr() {
315315
assert_eq!(stringify_expr!(mac! { ... }), "mac! { ... }");
316316

317317
// ExprKind::Struct
318-
assert_eq!(stringify_expr!(Struct {}), "Struct{}"); // FIXME
318+
assert_eq!(stringify_expr!(Struct {}), "Struct {}");
319319
#[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5151
320-
assert_eq!(stringify_expr!(<Struct as Trait>::Type {}), "<Struct as Trait>::Type{}");
321-
assert_eq!(stringify_expr!(Struct { .. }), "Struct{..}"); // FIXME
322-
assert_eq!(stringify_expr!(Struct { ..base }), "Struct{..base}"); // FIXME
323-
assert_eq!(stringify_expr!(Struct { x }), "Struct{x,}");
324-
assert_eq!(stringify_expr!(Struct { x, .. }), "Struct{x, ..}");
325-
assert_eq!(stringify_expr!(Struct { x, ..base }), "Struct{x, ..base}");
326-
assert_eq!(stringify_expr!(Struct { x: true }), "Struct{x: true,}");
327-
assert_eq!(stringify_expr!(Struct { x: true, .. }), "Struct{x: true, ..}");
328-
assert_eq!(stringify_expr!(Struct { x: true, ..base }), "Struct{x: true, ..base}");
320+
assert_eq!(stringify_expr!(<Struct as Trait>::Type {}), "<Struct as Trait>::Type {}");
321+
assert_eq!(stringify_expr!(Struct { .. }), "Struct { .. }");
322+
assert_eq!(stringify_expr!(Struct { ..base }), "Struct { ..base }");
323+
assert_eq!(stringify_expr!(Struct { x }), "Struct { x }");
324+
assert_eq!(stringify_expr!(Struct { x, .. }), "Struct { x, .. }");
325+
assert_eq!(stringify_expr!(Struct { x, ..base }), "Struct { x, ..base }");
326+
assert_eq!(stringify_expr!(Struct { x: true }), "Struct { x: true }");
327+
assert_eq!(stringify_expr!(Struct { x: true, .. }), "Struct { x: true, .. }");
328+
assert_eq!(stringify_expr!(Struct { x: true, ..base }), "Struct { x: true, ..base }");
329329

330330
// ExprKind::Repeat
331331
assert_eq!(stringify_expr!([(); 0]), "[(); 0]");

src/test/ui/rfc-2361-dbg-macro/dbg-macro-expected-behavior.run.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[$DIR/dbg-macro-expected-behavior.rs:20] Unit = Unit
22
[$DIR/dbg-macro-expected-behavior.rs:21] a = Unit
3-
[$DIR/dbg-macro-expected-behavior.rs:27] Point{x: 42, y: 24,} = Point {
3+
[$DIR/dbg-macro-expected-behavior.rs:27] Point { x: 42, y: 24 } = Point {
44
x: 42,
55
y: 24,
66
}

0 commit comments

Comments
 (0)