This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff 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) ) ) )
You can’t perform that action at this time.
0 commit comments