Skip to content

Commit ac43ba8

Browse files
committed
Format with rust-lang/rust's rustfmt settings
1 parent a51326f commit ac43ba8

File tree

1 file changed

+14
-41
lines changed

1 file changed

+14
-41
lines changed

src/test/ui/macros/stringify.rs

+14-41
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ fn test_expr() {
116116

117117
// ExprKind::Binary
118118
assert_eq!(stringify_expr!(true || false), "true || false");
119-
assert_eq!(
120-
stringify_expr!(true || false && false),
121-
"true || false && false",
122-
);
119+
assert_eq!(stringify_expr!(true || false && false), "true || false && false");
123120

124121
// ExprKind::Unary
125122
assert_eq!(stringify_expr!(*expr), "*expr");
@@ -180,10 +177,7 @@ fn test_expr() {
180177
// ExprKind::While
181178
assert_eq!(stringify_expr!(while true {}), "while true {}");
182179
assert_eq!(stringify_expr!('a: while true {}), "'a: while true {}");
183-
assert_eq!(
184-
stringify_expr!(while let true = true {}),
185-
"while let true = true {}",
186-
);
180+
assert_eq!(stringify_expr!(while let true = true {}), "while let true = true {}");
187181

188182
// ExprKind::ForLoop
189183
assert_eq!(stringify_expr!(for _ in x {}), "for _ in x {}");
@@ -328,14 +322,8 @@ fn test_expr() {
328322
assert_eq!(stringify_expr!(Struct { x, .. }), "Struct{x, ..}");
329323
assert_eq!(stringify_expr!(Struct { x, ..base }), "Struct{x, ..base}");
330324
assert_eq!(stringify_expr!(Struct { x: true }), "Struct{x: true,}");
331-
assert_eq!(
332-
stringify_expr!(Struct { x: true, .. }),
333-
"Struct{x: true, ..}",
334-
);
335-
assert_eq!(
336-
stringify_expr!(Struct { x: true, ..base }),
337-
"Struct{x: true, ..base}",
338-
);
325+
assert_eq!(stringify_expr!(Struct { x: true, .. }), "Struct{x: true, ..}");
326+
assert_eq!(stringify_expr!(Struct { x: true, ..base }), "Struct{x: true, ..base}");
339327

340328
// ExprKind::Repeat
341329
assert_eq!(stringify_expr!([(); 0]), "[(); 0]");
@@ -501,7 +489,10 @@ fn test_item() {
501489
);
502490
assert_eq!(
503491
stringify_item!(
504-
enum Enum<T> where T: 'a {
492+
enum Enum<T>
493+
where
494+
T: 'a,
495+
{
505496
Unit,
506497
Tuple(T),
507498
Struct { t: T },
@@ -660,10 +651,7 @@ fn test_pat() {
660651
// PatKind::Struct
661652
assert_eq!(stringify_pat!(Struct {}), "Struct { }"); // FIXME
662653
assert_eq!(stringify_pat!(Struct::<u8> {}), "Struct::<u8> { }");
663-
assert_eq!(
664-
stringify_pat!(Struct::<'static> {}),
665-
"Struct::<'static> { }",
666-
);
654+
assert_eq!(stringify_pat!(Struct::<'static> {}), "Struct::<'static> { }");
667655
assert_eq!(stringify_pat!(Struct { x }), "Struct { x }");
668656
assert_eq!(stringify_pat!(Struct { x: _x }), "Struct { x: _x }");
669657
assert_eq!(stringify_pat!(Struct { .. }), "Struct { .. }");
@@ -682,10 +670,7 @@ fn test_pat() {
682670
assert_eq!(stringify_pat!(Tuple(x)), "Tuple(x)");
683671
assert_eq!(stringify_pat!(Tuple(..)), "Tuple(..)");
684672
assert_eq!(stringify_pat!(Tuple(x, ..)), "Tuple(x, ..)");
685-
assert_eq!(
686-
stringify_pat!(<Struct as Trait>::Type()),
687-
"<Struct as Trait>::Type()",
688-
);
673+
assert_eq!(stringify_pat!(<Struct as Trait>::Type()), "<Struct as Trait>::Type()");
689674

690675
// PatKind::Or
691676
assert_eq!(stringify_pat!(true | false), "true | false");
@@ -696,10 +681,7 @@ fn test_pat() {
696681
assert_eq!(stringify_pat!(crate::Path), "crate::Path");
697682
assert_eq!(stringify_pat!(Path::<u8>), "Path::<u8>");
698683
assert_eq!(stringify_pat!(Path::<'static>), "Path::<'static>");
699-
assert_eq!(
700-
stringify_pat!(<Struct as Trait>::Type),
701-
"<Struct as Trait>::Type",
702-
);
684+
assert_eq!(stringify_pat!(<Struct as Trait>::Type), "<Struct as Trait>::Type");
703685

704686
// PatKind::Tuple
705687
assert_eq!(stringify_pat!(()), "()");
@@ -826,10 +808,7 @@ fn test_ty() {
826808
assert_eq!(stringify_ty!(PhantomData::<T>), "PhantomData<T>");
827809
assert_eq!(stringify_ty!(Fn() -> !), "Fn() -> !");
828810
assert_eq!(stringify_ty!(Fn(u8) -> !), "Fn(u8) -> !");
829-
assert_eq!(
830-
stringify_ty!(<Struct as Trait>::Type),
831-
"<Struct as Trait>::Type",
832-
);
811+
assert_eq!(stringify_ty!(<Struct as Trait>::Type), "<Struct as Trait>::Type");
833812

834813
// TyKind::TraitObject
835814
assert_eq!(stringify_ty!(dyn Send), "dyn Send");
@@ -874,14 +853,8 @@ fn test_vis() {
874853
assert_eq!(stringify_vis!(pub(in super)), "pub(super) ");
875854
assert_eq!(stringify_vis!(pub(in path::to)), "pub(in path::to) ");
876855
assert_eq!(stringify_vis!(pub(in ::path::to)), "pub(in ::path::to) ");
877-
assert_eq!(
878-
stringify_vis!(pub(in self::path::to)),
879-
"pub(in self::path::to) ",
880-
);
881-
assert_eq!(
882-
stringify_vis!(pub(in super::path::to)),
883-
"pub(in super::path::to) ",
884-
);
856+
assert_eq!(stringify_vis!(pub(in self::path::to)), "pub(in self::path::to) ");
857+
assert_eq!(stringify_vis!(pub(in super::path::to)), "pub(in super::path::to) ");
885858

886859
// VisibilityKind::Inherited
887860
// Directly calling `stringify_vis!()` does not work.

0 commit comments

Comments
 (0)