Skip to content

Commit

Permalink
Filter out anonymous generics in rustdoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Dec 5, 2021
1 parent 4c3f337 commit 28ed19b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,12 @@ fn clean_ty_generics(
.params
.iter()
.filter_map(|param| match param.kind {
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
ty::GenericParamDefKind::Lifetime => {
if param.name == kw::UnderscoreLifetime {
return None;
}
Some(param.clean(cx))
}
ty::GenericParamDefKind::Type { synthetic, .. } => {
if param.name == kw::SelfUpper {
assert_eq!(param.index, 0);
Expand Down

0 comments on commit 28ed19b

Please sign in to comment.