about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-15 04:03:44 +0000
committerbors <bors@rust-lang.org>2023-11-15 04:03:44 +0000
commit783b914fae9c61cdb4c3549e5df7fcbf0caf99e5 (patch)
tree5f253f940da9c1725b6b0a2a31a11bf315a5917e /tests/rustdoc-js-std/parser-errors.js
parentabf01e469b9f9a49fdf96eddb3537f9ab6ae2e4a (diff)
parent3f6b29ad32680d15f878ac89b80402ea447ed306 (diff)
downloadrust-783b914fae9c61cdb4c3549e5df7fcbf0caf99e5.tar.gz
rust-783b914fae9c61cdb4c3549e5df7fcbf0caf99e5.zip
Auto merge of #11804 - y21:issue-11803, r=dswij
[`impl_trait_in_params`]: avoid ICE when function with `impl Trait` type has no parameters

Fixes #11803

If I'm reading the old code correctly, it was taking the span of the first parameter (without checking that it exists, which caused the ICE) and uses that to figure out where the generic parameter to insert should go (cc `@blyxyas` you wrote the lint, is that correct?).
This seemed equivalent to just `generics.span`, which doesn't require calculating the spans like that and simplifies it a fair bit

changelog: don't ICE when function has no parameters but generics have an `impl Trait` type
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions