Skip to content

Commit 38d98a1

Browse files
varkoryodaldevoid
andcommitted
Implement const generics in generics_to_path_params
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent cd9a2c0 commit 38d98a1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/librustdoc/core.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,16 @@ impl<'tcx> DocContext<'tcx> {
236236
ty::GenericParamDefKind::Type { .. } => {
237237
args.push(hir::GenericArg::Type(self.ty_param_to_ty(param.clone())));
238238
}
239-
ty::GenericParamDefKind::Const { .. } => {
240-
unimplemented!() // FIXME(const_generics)
239+
ty::GenericParamDefKind::Const => {
240+
args.push(hir::GenericArg::Const(hir::ConstArg {
241+
value: hir::AnonConst {
242+
hir_id: hir::DUMMY_HIR_ID,
243+
body: hir::BodyId {
244+
hir_id: hir::DUMMY_HIR_ID,
245+
}
246+
},
247+
span: DUMMY_SP,
248+
}))
241249
}
242250
}
243251
}

0 commit comments

Comments
 (0)