diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-03-12 09:35:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-12 09:35:44 +0100 |
| commit | 27e674d9e9d70a2c25b73d3ac57660c6146f2a3d (patch) | |
| tree | 225a28aa77bf8e73203e45b64efa0bb18c16e816 /src/test/codegen/src-hash-algorithm | |
| parent | 2c6a29af35a81e20f8af4c32bf1b55c59b89eccd (diff) | |
| parent | a424f42e97f2d1696f51a4bb71f4d305dedeb847 (diff) | |
| download | rust-27e674d9e9d70a2c25b73d3ac57660c6146f2a3d.tar.gz rust-27e674d9e9d70a2c25b73d3ac57660c6146f2a3d.zip | |
Rollup merge of #94150 - Enselic:synthetic-generic-parameters-in-json, r=CraftSpider
rustdoc-json: Include GenericParamDefKind::Type::synthetic in JSON
The rustdoc JSON for
```
pub fn f(_: impl Clone) {}
```
will effectively be
```
pub fn f<impl Clone: Clone>(_: impl Clone) {}
```
where a synthetic generic parameter called `impl Clone` with generic trait bound
`Clone` is added to the function declaration.
The generated HTML filters out these generic parameters by doing
`self.params.iter().filter(|p| !p.is_synthetic_type_param())`, because the
synthetic generic paramter is not of interest to regular users.
For the same reason, we should expose whether or not a generic parameter is
synthetic or not also in the rustdoc JSON, so that rustdoc JSON clients can also
have the option to hide syntehtic generic parameters.
`@rustbot` modify labels: +A-rustdoc-json
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
