diff options
| author | Michael Goulet <michael@errs.io> | 2024-10-13 09:41:31 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-13 09:48:01 -0400 |
| commit | 204e6af3eaf305c62cc1908475dfa13dd7bcaab2 (patch) | |
| tree | ac50841fc45755c0d2b676578548b37bbc2f5acb | |
| parent | 8f8bee4f60d9d3769f75c70d558c27a95761c554 (diff) | |
| download | rust-204e6af3eaf305c62cc1908475dfa13dd7bcaab2.tar.gz rust-204e6af3eaf305c62cc1908475dfa13dd7bcaab2.zip | |
Remove const trait bound modifier hack
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 263e4a9379f..365924ef782 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -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) => { |
