File tree 2 files changed +4
-0
lines changed
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>(
2517
2517
}
2518
2518
hir:: GenericArg :: Lifetime ( _) => GenericArg :: Lifetime ( Lifetime :: elided ( ) ) ,
2519
2519
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
2520
2521
hir:: GenericArg :: Const ( ct)
2521
2522
if cx. tcx . has_attr ( ct. value . def_id , sym:: rustc_host) =>
2522
2523
{
Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ pub(crate) fn ty_args_to_args<'tcx>(
104
104
arg : index,
105
105
} ) ,
106
106
) ) ) ,
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.
107
110
GenericArgKind :: Const ( ct) if let ty:: ConstKind :: Param ( p) = ct. kind ( ) && p. name == sym:: host => None ,
108
111
GenericArgKind :: Const ( ct) => {
109
112
Some ( GenericArg :: Const ( Box :: new ( clean_middle_const ( kind. rebind ( ct) , cx) ) ) )
You can’t perform that action at this time.
0 commit comments