Skip to content

Commit

Permalink
Unrolled build for rust-lang#131653
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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
  • Loading branch information
rust-timer authored Oct 14, 2024
2 parents 27861c4 + 204e6af commit 1640fce
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions compiler/rustc_ast_lowering/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1327,14 +1327,8 @@ impl<'a, 'hir> LoweringContext<'a, '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) => {
Expand Down

0 comments on commit 1640fce

Please sign in to comment.