Skip to content

Commit 16f8396

Browse files
committed
Add some FIXMEs for remaining issues that we need to fix before using more const trait things in libcore
1 parent 6724f99 commit 16f8396

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/librustdoc/clean/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2517,6 +2517,7 @@ fn clean_generic_args<'tcx>(
25172517
}
25182518
hir::GenericArg::Lifetime(_) => GenericArg::Lifetime(Lifetime::elided()),
25192519
hir::GenericArg::Type(ty) => GenericArg::Type(clean_ty(ty, cx)),
2520+
// FIXME(effects): This will still emit `<true>` for non-const impls of const traits
25202521
hir::GenericArg::Const(ct)
25212522
if cx.tcx.has_attr(ct.value.def_id, sym::rustc_host) =>
25222523
{

src/librustdoc/clean/utils.rs

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ pub(crate) fn ty_args_to_args<'tcx>(
104104
arg: index,
105105
}),
106106
))),
107+
// FIXME(effects): this relies on the host effect being called `host`, which users could also name
108+
// their const generics.
109+
// FIXME(effects): this causes `host = true` and `host = false` generics to also be emitted.
107110
GenericArgKind::Const(ct) if let ty::ConstKind::Param(p) = ct.kind() && p.name == sym::host => None,
108111
GenericArgKind::Const(ct) => {
109112
Some(GenericArg::Const(Box::new(clean_middle_const(kind.rebind(ct), cx))))

0 commit comments

Comments
 (0)