Now, my question is, what error generation principle is being followed by Rustc here?
Though the underlying error is error[E0282]: type annotations needed, with addition of print line the error is being thrown is error[E0425]: cannot find value string_number in this scope
In the first line you have string_parse but in the second you have string_number.
Since the latter does not exist, the compiler is throwing an error immediately, and not proceeding to type checking, which is where the second error is coming up.
To assign and check types, the compiler needs to see all expressions in a function. To know all the expressions it needs to parse the whole function. To know where the function starts and ends, it needs to read the syntax and expand macros correctly.
So you will get errors about syntax and macros first. Then you will get errors related to expressions that can't be constructed (like reference to undefined variables), and only then you will get errors about types.
But generally nothing about order or specificity of errors is guaranteed, other than invalid code will be rejected in some way or another. How it's communicated depends on implementation details, and changes often.