Skip to content

Commit 1bab764

Browse files
oli-obkcuviper
authored andcommitted
Add some FIXMEs for remaining issues that we need to fix before using more const trait things in libcore
(cherry picked from commit 16f8396)
1 parent e9abb39 commit 1bab764

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2549,6 +2549,7 @@ fn clean_generic_args<'tcx>(
25492549
}
25502550
hir::GenericArg::Lifetime(_) => GenericArg::Lifetime(Lifetime::elided()),
25512551
hir::GenericArg::Type(ty) => GenericArg::Type(clean_ty(ty, cx)),
2552+
// FIXME(effects): This will still emit `<true>` for non-const impls of const traits
25522553
hir::GenericArg::Const(ct)
25532554
if cx.tcx.has_attr(ct.value.def_id, sym::rustc_host) =>
25542555
{

src/librustdoc/clean/utils.rs

Lines changed: 3 additions & 0 deletions
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)