You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/lib.rs
+18-4
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ use serde::{Deserialize, Serialize};
29
29
/// This integer is incremented with every breaking change to the API,
30
30
/// and is returned along with the JSON blob as [`Crate::format_version`].
31
31
/// Consuming code should assert that this value matches the format version(s) that it supports.
32
-
pubconstFORMAT_VERSION:u32 = 42;
32
+
pubconstFORMAT_VERSION:u32 = 43;
33
33
34
34
/// The root of the emitted JSON blob.
35
35
///
@@ -119,9 +119,23 @@ pub struct Item {
119
119
pubdocs:Option<String>,
120
120
/// This mapping resolves [intra-doc links](https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md) from the docstring to their IDs
121
121
publinks:HashMap<String,Id>,
122
-
/// Stringified versions of parsed attributes on this item.
123
-
/// Essentially debug printed (e.g. `#[inline]` becomes something similar to `#[attr="Inline(Hint)"]`).
124
-
/// Equivalent to the hir pretty-printing of attributes.
122
+
/// Attributes on this item.
123
+
///
124
+
/// Does not include `#[deprecated]` attributes: see the [`Self::deprecation`] field instead.
125
+
///
126
+
/// Some attributes appear in pretty-printed Rust form, regardless of their formatting
127
+
/// in the original source code. For example:
128
+
/// - `#[non_exhaustive]` and `#[must_use]` are represented as themselves.
129
+
/// - `#[no_mangle]` and `#[export_name]` are also represented as themselves.
130
+
/// - `#[repr(C)]` and other reprs also appear as themselves,
131
+
/// though potentially with a different order: e.g. `repr(i8, C)` may become `repr(C, i8)`.
132
+
/// Multiple repr attributes on the same item may be combined into an equivalent single attr.
133
+
///
134
+
/// Other attributes may appear debug-printed. For example:
135
+
/// - `#[inline]` becomes something similar to `#[attr="Inline(Hint)"]`.
136
+
///
137
+
/// As an internal implementation detail subject to change, this debug-printing format
138
+
/// is currently equivalent to the HIR pretty-printing of parsed attributes.
125
139
pubattrs:Vec<String>,
126
140
/// Information about the item’s deprecation, if present.
0 commit comments