@@ -58,19 +58,13 @@ fn test_block() {
5858 c1 ! ( block, [ { } ] , "{}" ) ;
5959 c1 ! ( block, [ { true } ] , "{ true }" ) ;
6060 c1 ! ( block, [ { return } ] , "{ return }" ) ;
61- c2 ! ( block, [ {
62- return ;
63- } ] ,
64- "{ return; }" ,
65- "{ return ; }"
66- ) ;
67- c2 ! ( block,
61+ c1 ! ( block, [ { return ; } ] , "{ return; }" ) ;
62+ c1 ! ( block,
6863 [ {
6964 let _;
7065 true
7166 } ] ,
72- "{ let _; true }" ,
73- "{ let _ ; true }"
67+ "{ let _; true }"
7468 ) ;
7569}
7670
@@ -158,16 +152,15 @@ fn test_expr() {
158152 } ] ,
159153 "if true {} else if false {} else {}"
160154 ) ;
161- c2 ! ( expr,
155+ c1 ! ( expr,
162156 [ if true {
163157 return ;
164158 } else if false {
165159 0
166160 } else {
167161 0
168162 } ] ,
169- "if true { return; } else if false { 0 } else { 0 }" ,
170- "if true { return ; } else if false { 0 } else { 0 }"
163+ "if true { return; } else if false { 0 } else { 0 }"
171164 ) ;
172165
173166 // ExprKind::While
@@ -325,7 +318,7 @@ fn test_expr() {
325318 ) ;
326319
327320 // ExprKind::Repeat
328- c2 ! ( expr, [ [ ( ) ; 0 ] ] , "[(); 0]" , "[() ; 0]") ;
321+ c1 ! ( expr, [ [ ( ) ; 0 ] ] , "[(); 0]" ) ;
329322
330323 // ExprKind::Paren
331324 c1 ! ( expr, [ ( expr) ] , "(expr)" ) ;
@@ -355,30 +348,29 @@ fn test_expr() {
355348#[ test]
356349fn test_item ( ) {
357350 // ItemKind::ExternCrate
358- c2 ! ( item, [ extern crate std; ] , "extern crate std;" , "extern crate std ;") ;
359- c2 ! ( item,
351+ c1 ! ( item, [ extern crate std; ] , "extern crate std;" ) ;
352+ c1 ! ( item,
360353 [ pub extern crate self as std; ] ,
361- "pub extern crate self as std;" ,
362- "pub extern crate self as std ;"
354+ "pub extern crate self as std;"
363355 ) ;
364356
365357 // ItemKind::Use
366358 c2 ! ( item,
367359 [ pub use crate :: { a, b:: c} ; ] ,
368360 "pub use crate::{a, b::c};" ,
369- "pub use crate :: { a, b :: c } ;"
361+ "pub use crate :: { a, b :: c };"
370362 ) ;
371- c2 ! ( item, [ pub use A :: * ; ] , "pub use A::*;" , "pub use A :: * ;" ) ;
363+ c2 ! ( item, [ pub use A :: * ; ] , "pub use A::*;" , "pub use A :: *;" ) ;
372364
373365 // ItemKind::Static
374- c2 ! ( item, [ pub static S : ( ) = { } ; ] , "pub static S: () = {};" , "pub static S : () = {} ;" ) ;
375- c2 ! ( item, [ static mut S : ( ) = { } ; ] , "static mut S: () = {};" , "static mut S : () = {} ;" ) ;
376- c2 ! ( item, [ static S : ( ) ; ] , "static S: ();" , "static S : () ;" ) ;
377- c2 ! ( item, [ static mut S : ( ) ; ] , "static mut S: ();" , "static mut S : () ;" ) ;
366+ c2 ! ( item, [ pub static S : ( ) = { } ; ] , "pub static S: () = {};" , "pub static S : () = {};" ) ;
367+ c2 ! ( item, [ static mut S : ( ) = { } ; ] , "static mut S: () = {};" , "static mut S : () = {};" ) ;
368+ c2 ! ( item, [ static S : ( ) ; ] , "static S: ();" , "static S : ();" ) ;
369+ c2 ! ( item, [ static mut S : ( ) ; ] , "static mut S: ();" , "static mut S : ();" ) ;
378370
379371 // ItemKind::Const
380- c2 ! ( item, [ pub const S : ( ) = { } ; ] , "pub const S: () = {};" , "pub const S : () = {} ;" ) ;
381- c2 ! ( item, [ const S : ( ) ; ] , "const S: ();" , "const S : () ;" ) ;
372+ c2 ! ( item, [ pub const S : ( ) = { } ; ] , "pub const S: () = {};" , "pub const S : () = {};" ) ;
373+ c2 ! ( item, [ const S : ( ) ; ] , "const S: ();" , "const S : ();" ) ;
382374
383375 // ItemKind::Fn
384376 c1 ! ( item,
@@ -397,9 +389,9 @@ fn test_item() {
397389 ) ;
398390
399391 // ItemKind::Mod
400- c2 ! ( item, [ pub mod m; ] , "pub mod m;" , "pub mod m ;") ;
392+ c1 ! ( item, [ pub mod m; ] , "pub mod m;" ) ;
401393 c1 ! ( item, [ mod m { } ] , "mod m {}" ) ;
402- c2 ! ( item, [ unsafe mod m; ] , "unsafe mod m;" , "unsafe mod m ;") ;
394+ c1 ! ( item, [ unsafe mod m; ] , "unsafe mod m;" ) ;
403395 c1 ! ( item, [ unsafe mod m { } ] , "unsafe mod m {}" ) ;
404396
405397 // ItemKind::ForeignMod
@@ -422,7 +414,7 @@ fn test_item() {
422414 = T ;
423415 ] ,
424416 "pub default type Type<'a>: Bound where Self: 'a = T;" ,
425- "pub default type Type < 'a > : Bound where Self : 'a, = T ;"
417+ "pub default type Type < 'a > : Bound where Self : 'a, = T;"
426418 ) ;
427419
428420 // ItemKind::Enum
@@ -459,9 +451,9 @@ fn test_item() {
459451 ) ;
460452
461453 // ItemKind::Struct
462- c2 ! ( item, [ pub struct Unit ; ] , "pub struct Unit;" , "pub struct Unit ;") ;
463- c2 ! ( item, [ struct Tuple ( ) ; ] , "struct Tuple();" , "struct Tuple() ;") ;
464- c2 ! ( item, [ struct Tuple ( T ) ; ] , "struct Tuple(T);" , "struct Tuple(T) ;") ;
454+ c1 ! ( item, [ pub struct Unit ; ] , "pub struct Unit;" ) ;
455+ c1 ! ( item, [ struct Tuple ( ) ; ] , "struct Tuple();" ) ;
456+ c1 ! ( item, [ struct Tuple ( T ) ; ] , "struct Tuple(T);" ) ;
465457 c1 ! ( item, [ struct Struct { } ] , "struct Struct {}" ) ;
466458 c2 ! ( item,
467459 [
@@ -510,7 +502,7 @@ fn test_item() {
510502 c2 ! ( item,
511503 [ pub trait Trait <T > = Sized where T : ' a; ] ,
512504 "pub trait Trait<T> = Sized where T: 'a;" ,
513- "pub trait Trait < T > = Sized where T : 'a ;"
505+ "pub trait Trait < T > = Sized where T : 'a;"
514506 ) ;
515507
516508 // ItemKind::Impl
@@ -525,8 +517,8 @@ fn test_item() {
525517 c2 ! ( item, [ impl ~const Struct { } ] , "impl ~const Struct {}" , "impl ~ const Struct {}" ) ;
526518
527519 // ItemKind::MacCall
528- c2 ! ( item, [ mac!( ...) ; ] , "mac!(...);" , "mac! (...) ;" ) ;
529- c2 ! ( item, [ mac![ ...] ; ] , "mac![...];" , "mac! [...] ;" ) ;
520+ c2 ! ( item, [ mac!( ...) ; ] , "mac!(...);" , "mac! (...);" ) ;
521+ c2 ! ( item, [ mac![ ...] ; ] , "mac![...];" , "mac! [...];" ) ;
530522 c1 ! ( item, [ mac! { ... } ] , "mac! { ... }" ) ;
531523
532524 // ItemKind::MacroDef
@@ -536,7 +528,7 @@ fn test_item() {
536528 ( ) => { } ;
537529 }
538530 ] ,
539- "macro_rules! stringify { () => {} ; }"
531+ "macro_rules! stringify { () => {}; }"
540532 ) ;
541533 c2 ! ( item,
542534 [ pub macro stringify( ) { } ] ,
@@ -671,7 +663,7 @@ fn test_stmt() {
671663 ) ;
672664
673665 // StmtKind::Item
674- c2 ! ( stmt, [ struct S ; ] , "struct S;" , "struct S ;") ;
666+ c1 ! ( stmt, [ struct S ; ] , "struct S;" ) ;
675667 c1 ! ( stmt, [ struct S { } ] , "struct S {}" ) ;
676668
677669 // StmtKind::Expr
@@ -695,7 +687,7 @@ fn test_ty() {
695687 c1 ! ( ty, [ [ T ] ] , "[T]" ) ;
696688
697689 // TyKind::Array
698- c2 ! ( ty, [ [ T ; 0 ] ] , "[T; 0]" , "[T ; 0]") ;
690+ c1 ! ( ty, [ [ T ; 0 ] ] , "[T; 0]" ) ;
699691
700692 // TyKind::Ptr
701693 c2 ! ( ty, [ * const T ] , "*const T" , "* const T" ) ;
0 commit comments