add is_host_effect
to GenericParamDefKind::Const
and address review
This commit is contained in:
parent
84a490712a
commit
9654d5ceaf
13 changed files with 35 additions and 28 deletions
|
@ -448,7 +448,6 @@ impl<'tcx> CanonicalVarValues<'tcx> {
|
|||
};
|
||||
ty::Region::new_late_bound(tcx, ty::INNERMOST, br).into()
|
||||
}
|
||||
// todo eh?
|
||||
CanonicalVarKind::Effect => ty::Const::new_bound(
|
||||
tcx,
|
||||
ty::INNERMOST,
|
||||
|
|
|
@ -12,7 +12,7 @@ use super::{Clause, EarlyBoundRegion, InstantiatedPredicates, ParamConst, ParamT
|
|||
pub enum GenericParamDefKind {
|
||||
Lifetime,
|
||||
Type { has_default: bool, synthetic: bool },
|
||||
Const { has_default: bool },
|
||||
Const { has_default: bool, is_host_effect: bool },
|
||||
}
|
||||
|
||||
impl GenericParamDefKind {
|
||||
|
@ -87,7 +87,7 @@ impl GenericParamDef {
|
|||
GenericParamDefKind::Type { has_default, .. } if has_default => {
|
||||
Some(tcx.type_of(self.def_id).map_bound(|t| t.into()))
|
||||
}
|
||||
GenericParamDefKind::Const { has_default } if has_default => {
|
||||
GenericParamDefKind::Const { has_default, .. } if has_default => {
|
||||
Some(tcx.const_param_default(self.def_id).map_bound(|c| c.into()))
|
||||
}
|
||||
_ => None,
|
||||
|
@ -187,7 +187,7 @@ impl<'tcx> Generics {
|
|||
GenericParamDefKind::Type { has_default, .. } => {
|
||||
own_defaults.types += has_default as usize;
|
||||
}
|
||||
GenericParamDefKind::Const { has_default } => {
|
||||
GenericParamDefKind::Const { has_default, .. } => {
|
||||
own_defaults.consts += has_default as usize;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue