diff options
| author | Martin Nordholts <enselic@gmail.com> | 2022-02-19 09:50:35 +0100 |
|---|---|---|
| committer | Martin Nordholts <enselic@gmail.com> | 2022-03-04 05:54:12 +0100 |
| commit | aa763fcf421e627455aa1de16df1292c8e1bcb9d (patch) | |
| tree | f0380c618dcca64aa91da9bc712991d4406132bb /src/test/codegen/src-hash-algorithm | |
| parent | 6d7684101a51f1c375ec84aef5d2fbdeb214bbc2 (diff) | |
| download | rust-aa763fcf421e627455aa1de16df1292c8e1bcb9d.tar.gz rust-aa763fcf421e627455aa1de16df1292c8e1bcb9d.zip | |
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 parameter 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 synthetic generic parameters.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions
