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
Auto merge of #2643 - JohnTitor:code-block-annot, r=jtgeibel
Shrink code block annotation after a comma
The Rust-specific code block annotations like `no_run` are used in doc testing through `doc-comment` or similar crates, and other services seem to ignore characters after a comma.
This removes characters from the annotations after a comma.
Since this is additional work, this may affect performance a bit, but from the benchmarks, it looks fine.
Also this allows `language-toml` class as it's supposed to be used widely.
Small input:
```
test bench_orig ... bench: 1,363 ns/iter (+/- 29)
test bench_tweaked ... bench: 1,498 ns/iter (+/- 28)
```
Large input (about 2k COL):
```
test bench_orig ... bench: 634,254 ns/iter (+/- 10,553)
test bench_tweaked ... bench: 636,279 ns/iter (+/- 13,216)
```
Fixes#1150
r? @jtgeibel
0 commit comments