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_space(",");
|
||||||
}
|
}
|
||||||
__p.word(#string_name);
|
__p.word(#string_name);
|
||||||
__p.word_space(":");
|
__p.word(":");
|
||||||
|
__p.nbsp();
|
||||||
__printed_anything = true;
|
__printed_anything = true;
|
||||||
}
|
}
|
||||||
#name.print_attribute(__p);
|
#name.print_attribute(__p);
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ extern crate std;
|
|||||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||||
struct PlainDeprecated;
|
struct PlainDeprecated;
|
||||||
|
|
||||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified, note:
|
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified,
|
||||||
"here's why this is deprecated"}}]
|
note: "here's why this is deprecated"}}]
|
||||||
struct DirectNote;
|
struct DirectNote;
|
||||||
|
|
||||||
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified, note:
|
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified,
|
||||||
"here's why this is deprecated"}}]
|
note: "here's why this is deprecated"}}]
|
||||||
struct ExplicitNote;
|
struct ExplicitNote;
|
||||||
|
|
||||||
#[attr = Deprecation {deprecation: Deprecation {since: NonStandard("1.2.3"),
|
#[attr = Deprecation {deprecation: Deprecation {since: NonStandard("1.2.3"),
|
||||||
@@ -28,8 +28,6 @@ struct FlippedOrder;
|
|||||||
fn f() {
|
fn f() {
|
||||||
|
|
||||||
// Attribute is ignored here (with a warning), but still preserved in HIR
|
// Attribute is ignored here (with a warning), but still preserved in HIR
|
||||||
#[attr = Deprecation {deprecation:
|
#[attr = Deprecation {deprecation: Deprecation {since: Unspecified}}]
|
||||||
Deprecation {since:
|
|
||||||
Unspecified}}]
|
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ mod attributes {
|
|||||||
#[doc = "outer doc attribute"]
|
#[doc = "outer doc attribute"]
|
||||||
#[doc = "macro"]
|
#[doc = "macro"]
|
||||||
#[allow()]
|
#[allow()]
|
||||||
#[attr = Repr {reprs:
|
#[attr = Repr {reprs: [ReprC]}]
|
||||||
[ReprC]}]
|
|
||||||
struct Struct;
|
struct Struct;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user