1
Fork 0

Support ?Trait bounds in supertraits and dyn Trait under a feature gate

This commit is contained in:
Bryanskiy 2024-02-23 16:39:57 +03:00
parent 28e684b470
commit 2a73553513
34 changed files with 305 additions and 85 deletions

View file

@ -652,7 +652,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
debug!(?bounds, ?lifetime, "TraitObject");
let scope = Scope::TraitRefBoundary { s: self.scope };
self.with(scope, |this| {
for bound in bounds {
for (bound, _) in bounds {
this.visit_poly_trait_ref_inner(
bound,
NonLifetimeBinderAllowed::Deny("trait object types"),