Skip to content

Commit

Permalink
Merge pull request rust-lang#791 from rust-lang/inline-is-a-hint
Browse files Browse the repository at this point in the history
Emphasize that `#[inline]` in all shapes is a hint.
  • Loading branch information
ehuss committed Apr 11, 2020
2 parents dbd58a1 + 1e92646 commit c2acacf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/attributes/codegen.md
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 c2acacf

Please sign in to comment.