Fix `feeless_if` in pallet section (#6032)
fixes #5981 Could confirm the issue with the added tests: ``` test tests/split_ui/pass/split_call.rs [should pass] ... error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ error[E0423]: expected value, found attribute macro `origin` --> tests/split_ui/pass/split_call.rs:23:1 | 23 | #[frame_support::pallet(dev_mode)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a value | = note: this error originates in the attribute macro `frame_support::pallet` (in Nightly builds, run with -Z macro-backtrace for more info) ``` # Description `origin` unexpectedly resolved to a macro, which is available at the span of invocation. The solution here is to use the expansion as a function instead of a call and pass in the desired values to avoid ambiguities.
Showing
- prdoc/pr_6032.prdoc 11 additions, 0 deletionsprdoc/pr_6032.prdoc
- substrate/frame/support/procedural/src/pallet/expand/call.rs 8 additions, 7 deletionssubstrate/frame/support/procedural/src/pallet/expand/call.rs
- substrate/frame/support/test/tests/split_ui/pass/call/mod.rs 63 additions, 0 deletionssubstrate/frame/support/test/tests/split_ui/pass/call/mod.rs
- substrate/frame/support/test/tests/split_ui/pass/split_call.rs 36 additions, 0 deletions...rate/frame/support/test/tests/split_ui/pass/split_call.rs
Please register or sign in to comment