Move equal sign back into head ibox

This commit is contained in:
David Tolnay 2021-12-29 11:53:03 -08:00
parent b7df49895c
commit b62163515a
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 5 additions and 5 deletions

View File

@ -1116,9 +1116,11 @@ impl<'a> State<'a> {
self.print_ident(ident); self.print_ident(ident);
self.word_space(":"); self.word_space(":");
self.print_type(ty); self.print_type(ty);
if body.is_some() {
self.space();
}
self.end(); // end the head-ibox self.end(); // end the head-ibox
if let Some(body) = body { if let Some(body) = body {
self.space();
self.word_space("="); self.word_space("=");
self.print_expr(body); self.print_expr(body);
} }

View File

@ -7,8 +7,7 @@ struct C {
} }
#[allow()] #[allow()]
const C: C const C: C =
=
C{ C{
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
field: 0, field: 0,

View File

@ -43,8 +43,7 @@ fn main() {
crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}', crate::TokenStream::from(crate::TokenTree::Punct(crate::Punct::new('\u{3b}',
crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>() crate::Spacing::Alone)))].iter().cloned().collect::<crate::TokenStream>()
} }
const _: () const _: () =
=
{ {
extern crate proc_macro; extern crate proc_macro;
#[rustc_proc_macro_decls] #[rustc_proc_macro_decls]