Skip to content

Commit

Permalink
Emphasize that #[inline] in all shapes is a hint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril authored and ehuss committed Apr 11, 2020
1 parent dbd58a1 commit 1e92646
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/attributes/codegen.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@ function where it is defined.
There are three ways to use the inline attribute:

* `#[inline]` suggests performing an inline expansion.
* `#[inline(always)]` suggests that an inline expansion should always be
* `#[inline]` *suggests* performing an inline expansion.
* `#[inline(always)]` *suggests* that an inline expansion should always be
performed.
* `#[inline(never)]` suggests that an inline expansion should never be
* `#[inline(never)]` *suggests* that an inline expansion should never be
performed.

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

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

0 comments on commit 1e92646

Please sign in to comment.