Skip to content

Commit c2acacf

Browse files
authored
Merge pull request #791 from rust-lang/inline-is-a-hint
Emphasize that `#[inline]` in all shapes is a hint.
2 parents dbd58a1 + 1e92646 commit c2acacf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/attributes/codegen.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ function where it is defined.
2525
2626
There are three ways to use the inline attribute:
2727

28-
* `#[inline]` suggests performing an inline expansion.
29-
* `#[inline(always)]` suggests that an inline expansion should always be
28+
* `#[inline]` *suggests* performing an inline expansion.
29+
* `#[inline(always)]` *suggests* that an inline expansion should always be
3030
performed.
31-
* `#[inline(never)]` suggests that an inline expansion should never be
31+
* `#[inline(never)]` *suggests* that an inline expansion should never be
3232
performed.
3333

34+
> ***Note***: `#[inline]` in every form is a hint, with no *requirements*
35+
> on the language to place a copy of the attributed function in the caller.
36+
3437
### The `cold` attribute
3538

3639
The *`cold` [attribute]* suggests that the attributed function is unlikely to

0 commit comments

Comments
 (0)