Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk

correctly lower `impl const` to bind to host effect param

r? `@oli-obk`
This commit is contained in:
bors 2023-08-08 19:23:41 +00:00
commit f88a8b71ce
64 changed files with 465 additions and 373 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