diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-10-13 18:27:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-13 18:27:22 +0200 |
| commit | 20add5185652a3efca27592ca19dca965f246700 (patch) | |
| tree | ce7cc80b85d843efd5a4b4955db13059c8955f4f | |
| parent | b9651d00d4d4ca8e4321c6ae26a68151dc4addb0 (diff) | |
| parent | 204e6af3eaf305c62cc1908475dfa13dd7bcaab2 (diff) | |
| download | rust-20add5185652a3efca27592ca19dca965f246700.tar.gz rust-20add5185652a3efca27592ca19dca965f246700.zip | |
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
| -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) => { |
