File tree 5 files changed +18
-16
lines changed
compiler/rustc_ast_pretty/src/pprust
5 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -1116,9 +1116,9 @@ impl<'a> State<'a> {
1116
1116
self . print_ident ( ident) ;
1117
1117
self . word_space ( ":" ) ;
1118
1118
self . print_type ( ty) ;
1119
- self . space ( ) ;
1120
1119
self . end ( ) ; // end the head-ibox
1121
1120
if let Some ( body) = body {
1121
+ self . space ( ) ;
1122
1122
self . word_space ( "=" ) ;
1123
1123
self . print_expr ( body) ;
1124
1124
}
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ struct C {
7
7
}
8
8
9
9
#[ allow( ) ]
10
- const C : C =
10
+ const C : C
11
+ =
11
12
C {
12
13
#[ cfg( debug_assertions) ]
13
14
field : 0 ,
Original file line number Diff line number Diff line change @@ -6,42 +6,42 @@ fn main() {}
6
6
7
7
#[ cfg( FALSE ) ]
8
8
extern "C" {
9
- static X : u8 ;
9
+ static X : u8 ;
10
10
type X ;
11
11
fn foo ( ) ;
12
- pub static X : u8 ;
12
+ pub static X : u8 ;
13
13
pub type X ;
14
14
pub fn foo ( ) ;
15
15
}
16
16
17
17
#[ cfg( FALSE ) ]
18
18
trait T {
19
- const X : u8 ;
19
+ const X : u8 ;
20
20
type X ;
21
21
fn foo ( ) ;
22
- default const X : u8 ;
22
+ default const X : u8 ;
23
23
default type X ;
24
24
default fn foo ( ) ;
25
- pub const X : u8 ;
25
+ pub const X : u8 ;
26
26
pub type X ;
27
27
pub fn foo ( ) ;
28
- pub default const X : u8 ;
28
+ pub default const X : u8 ;
29
29
pub default type X ;
30
30
pub default fn foo ( ) ;
31
31
}
32
32
33
33
#[ cfg( FALSE ) ]
34
34
impl T for S {
35
- const X : u8 ;
35
+ const X : u8 ;
36
36
type X ;
37
37
fn foo ( ) ;
38
- default const X : u8 ;
38
+ default const X : u8 ;
39
39
default type X ;
40
40
default fn foo ( ) ;
41
- pub const X : u8 ;
41
+ pub const X : u8 ;
42
42
pub type X ;
43
43
pub fn foo ( ) ;
44
- pub default const X : u8 ;
44
+ pub default const X : u8 ;
45
45
pub default type X ;
46
46
pub default fn foo ( ) ;
47
47
}
Original file line number Diff line number Diff line change @@ -382,13 +382,13 @@ fn test_item() {
382
382
stringify_item!(
383
383
static S : ( ) ;
384
384
) ,
385
- "static S: () ;" , // FIXME
385
+ "static S: ();" ,
386
386
) ;
387
387
assert_eq ! (
388
388
stringify_item!(
389
389
static mut S : ( ) ;
390
390
) ,
391
- "static mut S: () ;" ,
391
+ "static mut S: ();" ,
392
392
) ;
393
393
394
394
// ItemKind::Const
@@ -402,7 +402,7 @@ fn test_item() {
402
402
stringify_item!(
403
403
const S : ( ) ;
404
404
) ,
405
- "const S: () ;" , // FIXME
405
+ "const S: ();" ,
406
406
) ;
407
407
408
408
// ItemKind::Fn
Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ fn main() {
43
43
crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}',
44
44
crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
45
45
}
46
- const _: () =
46
+ const _: ()
47
+ =
47
48
{
48
49
extern crate proc_macro;
49
50
#[rustc_proc_macro_decls]
You can’t perform that action at this time.
0 commit comments