lower impl const to bind to host effect param

This commit is contained in:
Deadbeef 2023-07-25 05:58:53 +00:00
parent 4f7bb9890c
commit 92f4c59e48
24 changed files with 236 additions and 137 deletions

View file

@ -313,6 +313,16 @@ pub enum TraitBoundModifier {
MaybeConstMaybe,
}
impl TraitBoundModifier {
pub fn to_constness(self) -> Const {
match self {
// FIXME(effects) span
Self::MaybeConst => Const::Yes(DUMMY_SP),
_ => Const::No,
}
}
}
/// The AST represents all type param bounds as types.
/// `typeck::collect::compute_bounds` matches these against
/// the "special" built-in traits (see `middle::lang_items`) and