Attributes in rust are essentially macros and macros are hygienic and operates on token trees, and I don’t think that is going to change any time soon, for various reasons. That (obviously) doesn’t stop anyone from wanting to use a more C/C++ like system, so I bet someone is going to build it, but I really doubt that it will be included in rustc. We have build scripts for cargo and those can do practically anything with your code files, so the preprocessor possibilities are just as endless.
I can’t say anything about your case, so take this with a grain of salt, but C/C++ style preprocessing can be quite messy when done wrong and comes with a number of pitfalls and foot guns. I would recommend that you try an other approach first and see if it works. It may be worth chopping the function into smaller ones and factor out parts that can be generalized. The two versions shouldn’t be too different, after all, if they are supposed to do the same thing, but slightly differently, right?