Nginx config with try_files and rewrite: precedence?

Nginx process request in phases, and rewrite's phase is always before try_files phase. Therefore the order of these directives in config doesn't matter.