Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make fn argument name errors better (#1238)
### What When displaying argument name errors highlight the specific argument name instead of the fn as a whole as the point of the error. ### Why So that it is easier to see immediately where the error occurs. There are no test changes. I don't love that there isn't test coverage for compile errors. We used to have them, but removed all compile error testing at some point because in general the impact of breaking compile errors is low, and the tests are very slow because the tests have to run through a full compile and capture compiler output. ### Example #### Before ``` error: argument name too long, max length 30 characters --> tests/empty/src/lib.rs:9:12 | 9 | pub fn empty(a234567890123456789001234567890: u64) {} | ^^^^^ ``` ### After ``` error: argument name too long, max length 30 characters --> tests/empty/src/lib.rs:9:18 | 9 | pub fn empty(a234567890123456789001234567890: u64) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
- Loading branch information