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 Don't ICE when encountering bound var in builtin copy/clone bounds 2023-03-04 17:53:51 +00:00
bad-copy-cond.stderr Don't ICE when encountering bound var in builtin copy/clone bounds 2023-03-04 17:53:51 +00:00
bad-sized-cond.rs Pretty placeholders using their names 2023-02-18 19:49:40 +00:00
bad-sized-cond.stderr Specify what 'this' actually is 2023-02-21 05:21:07 +00:00
basic.rs
basic.stderr
capture-late-ct-in-anon.rs Correctly deny late-bound lifetimes from parent in anon consts and TAITs 2023-09-05 20:20:55 +00:00
capture-late-ct-in-anon.stderr Correctly deny late-bound lifetimes from parent in anon consts and TAITs 2023-09-05 20:20:55 +00:00
drop-impl-pred.no.stderr Add test for #110557 2023-05-04 18:06:07 +00:00
drop-impl-pred.rs Add test for #110557 2023-05-04 18:06:07 +00:00
drop-impl-pred.yes.stderr Add test for #110557 2023-05-04 18:06:07 +00:00
fail.rs
fail.stderr Point out if a local trait has no implementations 2023-09-10 21:20:36 +00:00
foreach-partial-eq.rs Don't ICE on bound var in reject_fn_ptr_impls 2023-06-19 02:52:03 +00:00
foreach-partial-eq.stderr Don't ICE on bound var in reject_fn_ptr_impls 2023-06-19 02:52:03 +00:00
late-bound-in-anon-ct.rs Correctly deny late-bound lifetimes from parent in anon consts and TAITs 2023-09-05 20:20:55 +00:00
late-bound-in-anon-ct.stderr Correctly deny late-bound lifetimes from parent in anon consts and TAITs 2023-09-05 20:20:55 +00:00
method-probe.rs Instantiate instead of erasing binder when probing param methods 2023-03-07 05:41:08 +00:00
method-probe.stderr Instantiate instead of erasing binder when probing param methods 2023-03-07 05:41:08 +00:00
missing-assoc-item.rs Erase escaping late-bound regions when probing for ambiguous associated types 2023-03-17 15:33:24 +00:00
missing-assoc-item.stderr Erase lifetimes above ty::INNERMOST when probing ambiguous types 2023-04-11 17:17:32 +00:00
nested-apit-mentioning-outer-bound-var.rs Account for late-bound vars from parent arg-position impl trait 2023-06-26 19:14:27 +00:00
nested-apit-mentioning-outer-bound-var.stderr Account for late-bound vars from parent arg-position impl trait 2023-06-26 19:14:27 +00:00
object-lifetime-default-for-late.rs Only look for param in generics if it actually comes from generics 2023-02-28 06:27:56 +00:00
object-lifetime-default-for-late.stderr Only look for param in generics if it actually comes from generics 2023-02-28 06:27:56 +00:00
on-dyn.rs
on-dyn.stderr
on-ptr.rs
on-ptr.stderr
sized-late-bound-issue-114872.rs Don't ICE in is_trivially_sized when encountering late-bound self ty 2023-08-16 01:57:33 +00:00
sized-late-bound-issue-114872.stderr Don't ICE in is_trivially_sized when encountering late-bound self ty 2023-08-16 01:57:33 +00:00
supertrait-object-safety.rs Enforce non-lifetime-binders in supertrait preds are not object safe 2023-03-20 22:38:57 +00:00
supertrait-object-safety.stderr Note base types of coercion 2023-05-12 00:10:52 +00:00
type-match-with-late-bound.rs Make sure test_type_match doesn't ICE with late-bound types 2023-02-18 20:16:51 +00:00
type-match-with-late-bound.stderr Make sure test_type_match doesn't ICE with late-bound types 2023-02-18 20:16:51 +00:00
universe-error1.rs Tweaks and a test 2023-05-15 16:40:42 +00:00
universe-error1.stderr Tweaks and a test 2023-05-15 16:40:42 +00:00