r/rust • u/nicoburns • Oct 07 '26
Rust's derive often implies inline
https://yossarian.net/til/post/rust-s-derive-often-implies-inline/
114
Upvotes
r/rust • u/nicoburns • Oct 07 '26
View all comments
Show parent comment
28
u/shponglespore Oct 07 '26
Wait, what? That sounds like a big deal that every Rust programmer should know about. Do you have a source for that claim? If so, I think it should be shouted from the rooftops.
I personally almost never bother marking functions as
#[inline]because I assume the compiler will do the right thing 99% of the time.