mir_transform: implement forced inlining
Adds `#[rustc_force_inline]` which is similar to always inlining but reports an error if the inlining was not possible, and which always attempts to inline annotated items, regardless of optimisation levels. It can only be applied to free functions to guarantee that the MIR inliner will be able to resolve calls.
This commit is contained in:
parent
336209eef1
commit
f86169a58f
47 changed files with 2130 additions and 709 deletions
|
@ -656,6 +656,14 @@ passes_rustc_allow_const_fn_unstable =
|
|||
passes_rustc_dirty_clean =
|
||||
attribute requires -Z query-dep-graph to be enabled
|
||||
|
||||
passes_rustc_force_inline =
|
||||
attribute should be applied to a function
|
||||
.label = not a function definition
|
||||
|
||||
passes_rustc_force_inline_coro =
|
||||
attribute cannot be applied to a `async`, `gen` or `async gen` function
|
||||
.label = `async`, `gen` or `async gen` function
|
||||
|
||||
passes_rustc_layout_scalar_valid_range_arg =
|
||||
expected exactly one integer literal argument
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue