You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments