diff options
| author | Michael Goulet <michael@errs.io> | 2023-11-07 00:07:57 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-12-05 19:53:59 +0000 |
| commit | 803772e81d1245a4d1eebcea5484b1f78ba5aca6 (patch) | |
| tree | c42238f1ea4f7e64b4a1b8b60a0674c19eca01f3 /tests/ui/impl-trait/variance.rs | |
| parent | acba7efe1ba688cac04810406ca27dbab60520fd (diff) | |
| download | rust-803772e81d1245a4d1eebcea5484b1f78ba5aca6.tar.gz rust-803772e81d1245a4d1eebcea5484b1f78ba5aca6.zip | |
Enable new capture rules by default on edition 2024
Diffstat (limited to 'tests/ui/impl-trait/variance.rs')
| -rw-r--r-- | tests/ui/impl-trait/variance.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/ui/impl-trait/variance.rs b/tests/ui/impl-trait/variance.rs index e111d37761f..86da1908509 100644 --- a/tests/ui/impl-trait/variance.rs +++ b/tests/ui/impl-trait/variance.rs @@ -1,4 +1,6 @@ -// revisions: old new +// revisions: old new e2024 +//[e2024] edition: 2024 +//[e2024] compile-flags: -Z unstable-options #![cfg_attr(new, feature(lifetime_capture_rules_2024))] @@ -12,12 +14,14 @@ impl<T> Captures<'_> for T {} fn not_captured_early<'a: 'a>() -> impl Sized {} //[old]~^ [*] //[new]~^^ [*, o] +//[e2024]~^^^ [*, o] fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {} //~ [*, o] fn not_captured_late<'a>(_: &'a ()) -> impl Sized {} //[old]~^ [] //[new]~^^ [o] +//[e2024]~^^^ [o] fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {} //~ [o] |
