Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are generics not inlined when appropriate even without #[inline] or LTO?


You don't need the #[inline] attribute when generics are involved, because Rust already has to cross-crate-export function metadata when generics are involved because otherwise it would be impossible to monomorphize. At that point, LLVM will inline the monomorphized functions as it deems fit.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: