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 @@ -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 {
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