rust/tests/mir-opt/inline/forced_inherent_dead_code.caller.ForceInline.panic-unwind.diff
Reuben Cruise 5bf5e71160 Extends rustc_force_inline to inherent methods
- Changes parser to allow application to inherent methods.
- Adds tests to confirm extended functionality works just as the existing.
2025-10-02 11:30:11 +01:00

21 lines
422 B
Diff

- // MIR for `caller` before ForceInline
+ // MIR for `caller` after ForceInline
fn caller() -> () {
let mut _0: ();
let _1: ();
+ scope 1 (inlined Foo::callee_forced) {
+ }
bb0: {
StorageLive(_1);
- _1 = Foo::callee_forced() -> [return: bb1, unwind continue];
- }
-
- bb1: {
StorageDead(_1);
_0 = const ();
return;
}
}