Skip to content

Add const generics to rustdoc #59170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 23, 2019
Prev Previous commit
Rebase over LazyConst changes
  • Loading branch information
varkor committed Mar 18, 2019
commit 9bc58118fc80e01eab53c72cfd8658b58d21c593
12 changes: 1 addition & 11 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use rustc::middle::resolve_lifetime as rl;
use rustc::middle::lang_items;
use rustc::middle::stability;
use rustc::mir::interpret::{GlobalId, ConstValue};
use rustc::hir::{self, GenericArg, HirVec};
use rustc::hir::{self, HirVec};
use rustc::hir::def::{self, Def, CtorKind};
use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc::hir::map::DisambiguatedDefPathData;
Expand Down Expand Up @@ -2931,16 +2931,6 @@ impl<'tcx> Clean<Type> for Ty<'tcx> {
}
}

impl<'tcx> Clean<Constant> for ty::LazyConst<'tcx> {
fn clean(&self, cx: &DocContext<'_>) -> Constant {
if let ty::LazyConst::Evaluated(ct) = self {
ct.clean(cx)
} else {
unimplemented!() // FIXME(const_generics)
}
}
}

impl<'tcx> Clean<Constant> for ty::Const<'tcx> {
fn clean(&self, cx: &DocContext<'_>) -> Constant {
Constant {
Expand Down