about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAlona Enraght-Moony <code@alona.page>2024-07-03 19:38:19 +0000
committerAlona Enraght-Moony <code@alona.page>2024-07-03 19:38:19 +0000
commitccc8baf08aa5a204a7df55e67022aa6c5254966c (patch)
tree43a8cd4ccdeeb87bcd8719ce394669d9e09a500a /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc872a1418a4be3ea84a8d5232238b60d35339ba9 (diff)
downloadrust-ccc8baf08aa5a204a7df55e67022aa6c5254966c.tar.gz
rust-ccc8baf08aa5a204a7df55e67022aa6c5254966c.zip
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
```

Fixing this typo, we now get.

```
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions