toml: fix custom to_toml
for complex structs
#19338
Merged
to_toml
for complex structs
#19338