Skip to content

Commit fc0fbe8

Browse files
varkoryodaldevoid
andcommitted
Stub rustdoc const generics implementations
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent eb2b8be commit fc0fbe8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,9 @@ impl<'tcx> Clean<GenericParamDef> for ty::GenericParamDef {
14821482
synthetic: None,
14831483
})
14841484
}
1485+
ty::GenericParamDefKind::Const { .. } => {
1486+
unimplemented!() // FIXME(const_generics)
1487+
}
14851488
};
14861489

14871490
GenericParamDef {
@@ -1629,6 +1632,9 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
16291632
}
16301633
Some(param.clean(cx))
16311634
}
1635+
ty::GenericParamDefKind::Const { .. } => {
1636+
unimplemented!() // FIXME(const_generics)
1637+
}
16321638
}).collect::<Vec<GenericParamDef>>();
16331639

16341640
let mut where_predicates = preds.predicates.iter()
@@ -1678,6 +1684,9 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
16781684
.flat_map(|param| match param.kind {
16791685
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
16801686
ty::GenericParamDefKind::Type { .. } => None,
1687+
ty::GenericParamDefKind::Const { .. } => {
1688+
unimplemented!() // FIXME(const_generics)
1689+
}
16811690
}).chain(simplify::ty_params(stripped_typarams).into_iter())
16821691
.collect(),
16831692
where_predicates: simplify::where_clauses(cx, where_predicates),

src/librustdoc/core.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ impl<'a, 'tcx, 'rcx> DocContext<'a, 'tcx, 'rcx> {
221221
ty::GenericParamDefKind::Type { .. } => {
222222
args.push(hir::GenericArg::Type(self.ty_param_to_ty(param.clone())));
223223
}
224+
ty::GenericParamDefKind::Const { .. } => {
225+
unimplemented!() // FIXME(const_generics)
226+
}
224227
}
225228
}
226229

0 commit comments

Comments
 (0)