This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -180,19 +180,13 @@ pub struct Item {
180180 ///
181181 /// Does not include `#[deprecated]` attributes: see the [`Self::deprecation`] field instead.
182182 ///
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
184184 /// in the original source code. For example:
185185 /// - `#[non_exhaustive]` and `#[must_use]` are represented as themselves.
186186 /// - `#[no_mangle]` and `#[export_name]` are also represented as themselves.
187187 /// - `#[repr(C)]` and other reprs also appear as themselves,
188188 /// though potentially with a different order: e.g. `repr(i8, C)` may become `repr(C, i8)`.
189189 /// 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.
196190 pub attrs : Vec < String > ,
197191 /// Information about the item’s deprecation, if present.
198192 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