Skip to content

Commit b621635

Browse files
committed
Move equal sign back into head ibox
1 parent b7df498 commit b621635

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: compiler/rustc_ast_pretty/src/pprust/state.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1116,9 +1116,11 @@ impl<'a> State<'a> {
11161116
self.print_ident(ident);
11171117
self.word_space(":");
11181118
self.print_type(ty);
1119+
if body.is_some() {
1120+
self.space();
1121+
}
11191122
self.end(); // end the head-ibox
11201123
if let Some(body) = body {
1121-
self.space();
11221124
self.word_space("=");
11231125
self.print_expr(body);
11241126
}

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ struct C {
77
}
88

99
#[allow()]
10-
const C: C
11-
=
10+
const C: C =
1211
C{
1312
#[cfg(debug_assertions)]
1413
field: 0,

Diff for: src/test/ui/proc-macro/quote-debug.stdout

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ fn main() {
4343
crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}',
4444
crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
4545
}
46-
const _: ()
47-
=
46+
const _: () =
4847
{
4948
extern crate proc_macro;
5049
#[rustc_proc_macro_decls]

0 commit comments

Comments
 (0)