There’s a lot of tribal knowledge surrounding
#[inline]attribute in Rust. I often find myself teaching how it works, so I finally decided to write this down.
Caveat Emptor: this is what I know, not necessary what is true. Additionally, exact semantics of
#[inline]is not set in stone and may change in future Rust versions.
Source: Inline In Rust, an article by Aleksey Kladov.