Skip to content

Documentation for #[inline] in the reference doesn't align with external resources #1140

Open
@saethlin

Description

@saethlin

The current documentation for #[inline] places huge emphasis on its effect as an inlining hint. I was recently referred to the reference when I tried to inform another user that its primary effect is enabling cross-crate inlining of non-generic functions. I'm not sure if this lack of documentation is just an oversight (which I'm happy to correct with a PR) or if this is deliberate because the cross-crate inlining effect is planned to be removed, or if the hint is guaranteed, but the codegen difference isn't.

I'm particularly concerned, because this effect is well-known in resources outside of the reference:
https://matklad.github.io/2021/07/09/inline-in-rust.html
rust-lang/hashbrown#119 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions