about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorMartin Nordholts <enselic@gmail.com>2022-02-19 09:50:35 +0100
committerMartin Nordholts <enselic@gmail.com>2022-03-04 05:54:12 +0100
commitaa763fcf421e627455aa1de16df1292c8e1bcb9d (patch)
treef0380c618dcca64aa91da9bc712991d4406132bb /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parent6d7684101a51f1c375ec84aef5d2fbdeb214bbc2 (diff)
downloadrust-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/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions