about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-04 08:33:26 +0100
committerGitHub <noreply@github.com>2024-01-04 08:33:26 +0100
commitf4335a419f743d08b1e371ef78881ce0d8b53a2a (patch)
treef9812cc848c78f6564a1f51196d6d4535ea1efa1 /tests/codegen/src-hash-algorithm
parent0db26e081d3e93f2807f6ad3c2b09b190e159b92 (diff)
parent695a02e0d8a532cd4ec44fe438a0ba5da59b76fc (diff)
downloadrust-f4335a419f743d08b1e371ef78881ce0d8b53a2a.tar.gz
rust-f4335a419f743d08b1e371ef78881ce0d8b53a2a.zip
Rollup merge of #119540 - fmease:no-effect-args-inside-dyn-trait, r=compiler-errors
Don't synthesize host effect args inside trait object types

While we were indeed emitting an error for `~const` & `const` trait bounds in trait object types, we were still synthesizing host effect args for them.

Since we don't record the original trait bound modifiers for dyn-Trait in `hir::TyKind::TraitObject` (unlike we do for let's say impl-Trait, `hir::TyKind::OpaqueTy`), AstConv just assumes `ty::BoundConstness::NotConst` in `conv_object_ty_poly_trait_ref` which given `<host> dyn ~const NonConstTrait` resulted in us not realizing that `~const` was used on a non-const trait which lead to a failed assertion in the end.

Instead of updating `hir::TyKind::TraitObject` to track this kind of information, just strip the user-provided constness (similar to #119505).

Fixes #119524.
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions