Skip to content

Commit 204e6af

Browse files
Remove const trait bound modifier hack
1 parent 8f8bee4 commit 204e6af

File tree

1 file changed

+2
-8
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+2
-8
lines changed

compiler/rustc_ast_lowering/src/lib.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -1327,14 +1327,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
13271327
// takes care of rejecting invalid modifier combinations and
13281328
// const trait bounds in trait object types.
13291329
GenericBound::Trait(ty, modifiers) => {
1330-
// Still, don't pass along the constness here; we don't want to
1331-
// synthesize any host effect args, it'd only cause problems.
1332-
let modifiers = TraitBoundModifiers {
1333-
constness: BoundConstness::Never,
1334-
..*modifiers
1335-
};
1336-
let trait_ref = this.lower_poly_trait_ref(ty, itctx, modifiers);
1337-
let polarity = this.lower_trait_bound_modifiers(modifiers);
1330+
let trait_ref = this.lower_poly_trait_ref(ty, itctx, *modifiers);
1331+
let polarity = this.lower_trait_bound_modifiers(*modifiers);
13381332
Some((trait_ref, polarity))
13391333
}
13401334
GenericBound::Outlives(lifetime) => {

0 commit comments

Comments
 (0)