File tree 2 files changed +12
-7
lines changed
2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -180,19 +180,13 @@ pub struct Item {
180
180
///
181
181
/// Does not include `#[deprecated]` attributes: see the [`Self::deprecation`] field instead.
182
182
///
183
- /// Some attributes appear in pretty-printed Rust form, regardless of their formatting
183
+ /// Attributes appear in pretty-printed Rust form, regardless of their formatting
184
184
/// in the original source code. For example:
185
185
/// - `#[non_exhaustive]` and `#[must_use]` are represented as themselves.
186
186
/// - `#[no_mangle]` and `#[export_name]` are also represented as themselves.
187
187
/// - `#[repr(C)]` and other reprs also appear as themselves,
188
188
/// though potentially with a different order: e.g. `repr(i8, C)` may become `repr(C, i8)`.
189
189
/// Multiple repr attributes on the same item may be combined into an equivalent single attr.
190
- ///
191
- /// Other attributes may appear debug-printed. For example:
192
- /// - `#[inline]` becomes something similar to `#[attr="Inline(Hint)"]`.
193
- ///
194
- /// As an internal implementation detail subject to change, this debug-printing format
195
- /// is currently equivalent to the HIR pretty-printing of parsed attributes.
196
190
pub attrs : Vec < String > ,
197
191
/// Information about the item’s deprecation, if present.
198
192
pub deprecation : Option < Deprecation > ,
Original file line number Diff line number Diff line change
1
+ //@ is "$.index[?(@.name=='just_inline')].attrs" '["#[inline]"]'
2
+ #[ inline]
3
+ pub fn just_inline ( ) { }
4
+
5
+ //@ is "$.index[?(@.name=='inline_always')].attrs" '["#[inline(always)]"]'
6
+ #[ inline( always) ]
7
+ pub fn inline_always ( ) { }
8
+
9
+ //@ is "$.index[?(@.name=='inline_never')].attrs" '["#[inline(never)]"]'
10
+ #[ inline( never) ]
11
+ pub fn inline_never ( ) { }
You can’t perform that action at this time.
0 commit comments