rust/tests/mir-opt/inline/forced_inherent.caller.ForceInline.panic-abort.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
405 B
Diff

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