From 1e9264614f13c52a48111f5a4c06543c096eb3f4 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Sat, 11 Apr 2020 01:44:01 +0200 Subject: [PATCH] Emphasize that `#[inline]` in all shapes is a hint. --- src/attributes/codegen.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/attributes/codegen.md b/src/attributes/codegen.md index 5b504c13a..ebcef8c28 100644 --- a/src/attributes/codegen.md +++ b/src/attributes/codegen.md @@ -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