mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Fix spacing and ordering of words in pretty printed Impl
This commit is contained in:
parent
f3df63f8ee
commit
a24e238bdf
@ -1285,14 +1285,17 @@ impl<'a> State<'a> {
|
||||
self.print_visibility(&item.vis);
|
||||
self.print_defaultness(defaultness);
|
||||
self.print_unsafety(unsafety);
|
||||
self.word_nbsp("impl");
|
||||
self.print_constness(constness);
|
||||
self.word("impl");
|
||||
|
||||
if !generics.params.is_empty() {
|
||||
if generics.params.is_empty() {
|
||||
self.nbsp();
|
||||
} else {
|
||||
self.print_generic_params(&generics.params);
|
||||
self.space();
|
||||
}
|
||||
|
||||
self.print_constness(constness);
|
||||
|
||||
if let ast::ImplPolarity::Negative(_) = polarity {
|
||||
self.word("!");
|
||||
}
|
||||
|
@ -603,7 +603,7 @@ fn test_item() {
|
||||
stringify_item!(
|
||||
impl<T> Struct<T> {}
|
||||
),
|
||||
"impl <T> Struct<T> {}", // FIXME
|
||||
"impl<T> Struct<T> {}",
|
||||
);
|
||||
assert_eq!(
|
||||
stringify_item!(
|
||||
@ -615,7 +615,7 @@ fn test_item() {
|
||||
stringify_item!(
|
||||
impl<T> const Trait for T {}
|
||||
),
|
||||
"impl const <T> Trait for T {}", // FIXME
|
||||
"impl<T> const Trait for T {}",
|
||||
);
|
||||
assert_eq!(
|
||||
stringify_item!(
|
||||
|
Loading…
Reference in New Issue
Block a user