Rust: what does #[inline] do?

  Kiến thức lập trình

I have read The rust performance book extract after coming across an #[inline] but some points remain unclear to me (I might just be missing context/experience).

Does #[inline] have just performance implication and does not change the program behaviour in any case?

Can you come up with an easy example in which #[inline] worsens performance? Does it exist?

LEAVE A COMMENT