1
Fork 0

Stub rustdoc const generics implementations

Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
varkor 2019-02-20 01:18:04 +00:00
parent eb2b8be6a0
commit fc0fbe8bb5
2 changed files with 12 additions and 0 deletions

View file

@ -1482,6 +1482,9 @@ impl<'tcx> Clean<GenericParamDef> for ty::GenericParamDef {
synthetic: None, synthetic: None,
}) })
} }
ty::GenericParamDefKind::Const { .. } => {
unimplemented!() // FIXME(const_generics)
}
}; };
GenericParamDef { GenericParamDef {
@ -1629,6 +1632,9 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
} }
Some(param.clean(cx)) Some(param.clean(cx))
} }
ty::GenericParamDefKind::Const { .. } => {
unimplemented!() // FIXME(const_generics)
}
}).collect::<Vec<GenericParamDef>>(); }).collect::<Vec<GenericParamDef>>();
let mut where_predicates = preds.predicates.iter() let mut where_predicates = preds.predicates.iter()
@ -1678,6 +1684,9 @@ impl<'a, 'tcx> Clean<Generics> for (&'a ty::Generics,
.flat_map(|param| match param.kind { .flat_map(|param| match param.kind {
ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)), ty::GenericParamDefKind::Lifetime => Some(param.clean(cx)),
ty::GenericParamDefKind::Type { .. } => None, ty::GenericParamDefKind::Type { .. } => None,
ty::GenericParamDefKind::Const { .. } => {
unimplemented!() // FIXME(const_generics)
}
}).chain(simplify::ty_params(stripped_typarams).into_iter()) }).chain(simplify::ty_params(stripped_typarams).into_iter())
.collect(), .collect(),
where_predicates: simplify::where_clauses(cx, where_predicates), where_predicates: simplify::where_clauses(cx, where_predicates),

View file

@ -221,6 +221,9 @@ impl<'a, 'tcx, 'rcx> DocContext<'a, 'tcx, 'rcx> {
ty::GenericParamDefKind::Type { .. } => { ty::GenericParamDefKind::Type { .. } => {
args.push(hir::GenericArg::Type(self.ty_param_to_ty(param.clone()))); args.push(hir::GenericArg::Type(self.ty_param_to_ty(param.clone())));
} }
ty::GenericParamDefKind::Const { .. } => {
unimplemented!() // FIXME(const_generics)
}
} }
} }