Rollup merge of #131653 - compiler-errors:no-modifier-hack, r=fee1-dead

Remove const trait bound modifier hack

It's no longer necessary, according to the test suite :D

r? `@fee1-dead` or anyone really
This commit is contained in:
Matthias Krüger 2024-10-13 18:27:22 +02:00 committed by GitHub
commit 20add51856
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1327,14 +1327,8 @@ fn lower_ty_direct(&mut self, t: &Ty, itctx: ImplTraitContext) -> hir::Ty<'hir>
// takes care of rejecting invalid modifier combinations and
// const trait bounds in trait object types.
GenericBound::Trait(ty, modifiers) => {
// Still, don't pass along the constness here; we don't want to
// synthesize any host effect args, it'd only cause problems.
let modifiers = TraitBoundModifiers {
constness: BoundConstness::Never,
..*modifiers
};
let trait_ref = this.lower_poly_trait_ref(ty, itctx, modifiers);
let polarity = this.lower_trait_bound_modifiers(modifiers);
let trait_ref = this.lower_poly_trait_ref(ty, itctx, *modifiers);
let polarity = this.lower_trait_bound_modifiers(*modifiers);
Some((trait_ref, polarity))
}
GenericBound::Outlives(lifetime) => {