Fix line break after ":" in unpretty attribute print
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
This commit is contained in:
@@ -21,7 +21,8 @@ fn print_fields(name: &Ident, fields: &Fields) -> (TokenStream, TokenStream, Tok
|
||||
__p.word_space(",");
|
||||
}
|
||||
__p.word(#string_name);
|
||||
__p.word_space(":");
|
||||
__p.word(":");
|
||||
__p.nbsp();
|
||||
__printed_anything = true;
|
||||
}
|
||||
#name.print_attribute(__p);
|
||||
|
||||
@@ -9,12 +9,12 @@ extern crate std;
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
struct PlainDeprecated;
|
||||
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified, note:
|
||||
"here's why this is deprecated"}}]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified,
|
||||
note: "here's why this is deprecated"}}]
|
||||
struct DirectNote;
|
||||
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified, note:
|
||||
"here's why this is deprecated"}}]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified,
|
||||
note: "here's why this is deprecated"}}]
|
||||
struct ExplicitNote;
|
||||
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: NonStandard("1.2.3"),
|
||||
@@ -28,8 +28,6 @@ struct FlippedOrder;
|
||||
fn f() {
|
||||
|
||||
// Attribute is ignored here (with a warning), but still preserved in HIR
|
||||
#[attr = Deprecation {deprecation:
|
||||
Deprecation {since:
|
||||
Unspecified}}]
|
||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||
0
|
||||
}
|
||||
|
||||
@@ -64,8 +64,7 @@ mod attributes {
|
||||
#[doc = "outer doc attribute"]
|
||||
#[doc = "macro"]
|
||||
#[allow()]
|
||||
#[attr = Repr {reprs:
|
||||
[ReprC]}]
|
||||
#[attr = Repr {reprs: [ReprC]}]
|
||||
struct Struct;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user