diff options
| author | bors <bors@rust-lang.org> | 2022-07-16 14:05:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-16 14:05:52 +0000 |
| commit | 56351589f8c5afe07a9151dd4a75976aebd1a709 (patch) | |
| tree | f808a337116ebb9aa8f47464ea3bf77cad7dd3e3 /src/librustdoc/html/static/js/source-script.js | |
| parent | d695a497bbf4b20d2580b75075faa80230d41667 (diff) | |
| parent | 2902b92769a29d24f9107d2e322ed9c92990da98 (diff) | |
| download | rust-56351589f8c5afe07a9151dd4a75976aebd1a709.tar.gz rust-56351589f8c5afe07a9151dd4a75976aebd1a709.zip | |
Auto merge of #99263 - compiler-errors:issue-99261, r=jyn514
Fix ICE in `named_arguments_used_positionally` lint
Fixes #99261
Fixes #99289
Fixes #99284
Fixes #99273
Fixes #99297
Fixes #99271
This match pattern:
```
FormatSpec { width: Count::CountIsName(s, _), .. }
| FormatSpec { precision: Count::CountIsName(s, _), .. }
```
does not account for when both `width` and `precision` are both `Count::CountIsName`, so split the check for these two fields into two separate `if let`.
Also, remove any future potential for ICEs by removing the index operator altogether.
---
It is still suspicious that this indexing was broken and caused the ICE, as opposed to just causing a spurious lint message.
cc `@PrestonFrom,` who may be familiar with this code because of implementing the lint this touches, perhaps you'd like to look into why named arguments in `FormatSpec.precision` seem to have indices that don't correspond to a span in `Context.arg_spans`?
Edit: Opened #99265 to track a (related?) incorrect argument indexing issue.
Diffstat (limited to 'src/librustdoc/html/static/js/source-script.js')
0 files changed, 0 insertions, 0 deletions
