diff --git a/Changelog.md b/Changelog.md index 8e42c61..9620f75 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,7 @@ - add release-lto profile for slightly smaller/faster version thanks @zamazan4ik for the suggestion - detect and render merged functions (#310) +- update docs (#320) ## [0.2.40] - 2024-10-01 - more consistend behavior when only one item is detected (#312) diff --git a/README.md b/README.md index e36010d..c82afa1 100644 --- a/README.md +++ b/README.md @@ -259,6 +259,10 @@ generic parameters and if it is exported (in case of a library) and not inlined binary, example, test, etc.). If your function takes a generic parameter - try making a monomorphic wrapper around it and make it `pub` and `#[inline(never)]`. +Alternatively if your function is too small - `rustc` might decide to inline it automatically +with the same result. Marking it with `#[inline(never)]` fixes this problem. +See https://github.com/rust-lang/rust/pull/116505 for more details + # Include related functions? So suppose you have a function `foo` that calls some other function - `bar`. With `--context N` diff --git a/README.tpl b/README.tpl index 212fab2..645a8b6 100644 --- a/README.tpl +++ b/README.tpl @@ -83,6 +83,10 @@ generic parameters and if it is exported (in case of a library) and not inlined binary, example, test, etc.). If your function takes a generic parameter - try making a monomorphic wrapper around it and make it `pub` and `#[inline(never)]`. +Alternatively if your function is too small - `rustc` might decide to inline it automatically +with the same result. Marking it with `#[inline(never)]` fixes this problem. +See https://github.com/rust-lang/rust/pull/116505 for more details + # Include related functions? So suppose you have a function `foo` that calls some other function - `bar`. With `--context N`