438 allowed layout macros to parse any method call on a layout object, translated verbatim to a method call on the generated Visitor object. This is potentially undesirable (already .pack(hints) is translated to .pack(hints, storage) for some generated storage object and .map_all() adjusts macro expansion instead of translating to a method call). This PR adds direct support for parsing .align(hints) and removes support for translating method calls verbatim.
Note: all these method calls emulate methods available on widget objects. rust-analyzer appears to link .pack and .align to the emulated method of AdaptWidget instead of the actually-used method on Visitor (possibly a bug, but it's acceptable here). The .map_all() method is not linked to anything (not surprising since the macro does not expand it as a method call). Unfortunately rust-analyzer is not able to suggest any of these available methods.
438 allowed layout macros to parse any method call on a layout object, translated verbatim to a method call on the generated
Visitor
object. This is potentially undesirable (already.pack(hints)
is translated to.pack(hints, storage)
for some generatedstorage
object and.map_all()
adjusts macro expansion instead of translating to a method call). This PR adds direct support for parsing.align(hints)
and removes support for translating method calls verbatim.Note: all these method calls emulate methods available on widget objects.
rust-analyzer
appears to link.pack
and.align
to the emulated method ofAdaptWidget
instead of the actually-used method onVisitor
(possibly a bug, but it's acceptable here). The.map_all()
method is not linked to anything (not surprising since the macro does not expand it as a method call). Unfortunatelyrust-analyzer
is not able to suggest any of these available methods.