Maybe you're right, but I think both are hard enough that people who are smart enough to do one can do the other if they really want :)
By the way AST manipulation is easy, the really hard part of refactoring (that I had a lot of problem with) is creating the lifetime annotations, which requires a deep understanding of the type system.
I was trying to learn some type theory and read papers to understand how Rust's life times work, but only found long research papers that don't even do the same thing as Rust.
I haven't found any documentation that documents exactly when a function call is accepted by the lifetime checker (borrow checking is easy).
I hate that I can't introduce new lifetime inside a function, it would make refactoring so much easier. Right now I have to try to refactor, see if the compiler accepts it or not, then revert the change.
Sometimes desugaring would be a great feature in itself, sugaring makes interactions between functions much harder to understand.
By the way AST manipulation is easy, the really hard part of refactoring (that I had a lot of problem with) is creating the lifetime annotations, which requires a deep understanding of the type system.
I was trying to learn some type theory and read papers to understand how Rust's life times work, but only found long research papers that don't even do the same thing as Rust.
I haven't found any documentation that documents exactly when a function call is accepted by the lifetime checker (borrow checking is easy).