3 ms·
I believe #[inline(always)] and #[inline(never)] both work like this.
by Jweb_Guru 11y ago
I believe #[inline(always)] and #[inline(never)] both work like this.
- kbenson 11y agoAccording to steveklabnik here[1], those are on the definition, not the callsite, which is the distinction here. Although from other info here, it sounds like having it on the definition is a prerequisite in some cases if you wanted to somehow specify it for the callsite, as it needs to be serialized in the crate metadata to be inline-able, and that's controlled somewhat by whether it was defined as inline capable. 1: https://news.ycombinator.com/item?id=9548248 https://news.ycombinator.com/item?id=9548248