Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#127287 - aDotInTheVoid:jsondocck-index, r=GuillaumeGomez jsondocck: Use correct index for error message. If you misused a count command like ``@count` $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` This is because 57c85bd removed the file param, but didn't update the error case. We now error with: ``` Invalid command: Second argument to `@count` must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix. r? `@GuillaumeGomez`
- Loading branch information