You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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`
0 commit comments