mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-12 09:57:43 +00:00

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.
13 lines
293 B
Diff
13 lines
293 B
Diff
- // MIR for `caller` before ForceInline
|
|
+ // MIR for `caller` after ForceInline
|
|
|
|
fn caller() -> {async fn body of caller()} {
|
|
let mut _0: {async fn body of caller()};
|
|
|
|
bb0: {
|
|
_0 = {coroutine@$DIR/forced_async.rs:10:19: 14:2 (#0)};
|
|
return;
|
|
}
|
|
}
|
|
|