when i use macros like select!{} which from tokio crate, i have to manually change the style of code which in the select!{...}. why cannot automatically be format by cargo fmt, could it possible?
All macros effectively define Domain-Specific Languages (DSLs), and each of those has its own internal logic and code style, none of which has to align with those of Rust, or those of each other.
That would make such formatting quite tricky to do, if at all possible.
That's a careful design choice made by rustfmt. You can format more with:
It can actually format macros, but only a few of them (AFAIK it's constrained for macro![...] or macro!() and those that look like function calls, but I don't remember the details).
rustfmt wants to work without looking up definitions -- you'll notice you can format Rust code even when it's totally broken in types or typos or whatever -- and to format a macro well you'd need to look up what it takes (expr/whatever) which it's better for formatters to just not do.