Skip to content

Update docs for inline_always + target_feature - #2391

Open
Jamesbarford wants to merge 1 commit into
rust-lang:masterfrom
Jamesbarford:feat/inline_always+target_feature
Open

Jamesbarford wants to merge 1 commit into
rust-lang:masterfrom
Jamesbarford:feat/inline_always+target_feature

Conversation

@Jamesbarford

Copy link
Copy Markdown

Documentation updates for the PR allowing inline_always + target_feature rust-lang/rust#162460

@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 19, 2026
Comment thread src/attributes/codegen.md Outdated
Comment on lines +317 to +319
r[attributes.codegen.target_feature.inline]
Functions marked with `target_feature` are not inlined into a context that
does not support the given features. The `#[inline(always)]` attribute may not
be used with a `target_feature` attribute.
does not support the given features, a guarantee provided by LLVM since version 23.

@RalfJung RalfJung Oct 19, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the attributes.codegen.target_feature.inline clause should be removed entirely. What does and does not get inlined is an implementation detail, not a guarantee. The only guarantee we provide is that we're not introducing UB into your code.

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've removed the entire passage now.

@Jamesbarford
Jamesbarford force-pushed the feat/inline_always+target_feature branch from b8e5028 to d21817a Compare October 19, 2026 11:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants