rust/tests/ui/traits/non_lifetime_binders
bors 4b91288484 Auto merge of #115486 - compiler-errors:dont-capture-late-pls, r=cjgillot
Correctly deny late-bound lifetimes from parent in anon consts and TAITs

Reuse the `AnonConstBoundary` scope (introduced in #108553, renamed in this PR to `LateBoundary`) to deny late-bound vars of *all* kinds (ty/const/lifetime) in anon consts and TAITs.

Side-note, but I would like to consolidate this with the error reporting for RPITs (E0657):
c4f25777a0/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs (L733-L754) but the semantics about what we're allowed to capture there are slightly different, so I'm leaving that untouched.

Fixes #115474
2023-09-20 03:34:51 +00:00
..
bad-copy-cond.rs
bad-copy-cond.stderr
bad-sized-cond.rs
bad-sized-cond.stderr
basic.rs
basic.stderr
capture-late-ct-in-anon.rs
capture-late-ct-in-anon.stderr
drop-impl-pred.no.stderr
drop-impl-pred.rs
drop-impl-pred.yes.stderr
fail.rs
fail.stderr
foreach-partial-eq.rs
foreach-partial-eq.stderr
late-bound-in-anon-ct.rs
late-bound-in-anon-ct.stderr
method-probe.rs
method-probe.stderr
missing-assoc-item.rs
missing-assoc-item.stderr
nested-apit-mentioning-outer-bound-var.rs
nested-apit-mentioning-outer-bound-var.stderr
object-lifetime-default-for-late.rs
object-lifetime-default-for-late.stderr
on-dyn.rs
on-dyn.stderr
on-ptr.rs
on-ptr.stderr
sized-late-bound-issue-114872.rs
sized-late-bound-issue-114872.stderr
supertrait-object-safety.rs
supertrait-object-safety.stderr
type-match-with-late-bound.rs
type-match-with-late-bound.stderr
universe-error1.rs
universe-error1.stderr