diff options
| author | est31 <MTest31@outlook.com> | 2024-11-10 20:58:00 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2025-04-18 14:21:14 +0200 |
| commit | 2e61af2fca192e155cc99ddd90ec534fdc70cf98 (patch) | |
| tree | 6fd74d26a16d3807a4676900d0269522db985ad7 /tests/ui/drop | |
| parent | 1f76d219c906f0112bb1872f33aa977164c53fa6 (diff) | |
| download | rust-2e61af2fca192e155cc99ddd90ec534fdc70cf98.tar.gz rust-2e61af2fca192e155cc99ddd90ec534fdc70cf98.zip | |
Stabilize let chains on edition 2024
Diffstat (limited to 'tests/ui/drop')
| -rw-r--r-- | tests/ui/drop/drop_order.rs | 3 | ||||
| -rw-r--r-- | tests/ui/drop/drop_order_if_let_rescope.rs | 4 | ||||
| -rw-r--r-- | tests/ui/drop/issue-100276.rs | 7 |
3 files changed, 9 insertions, 5 deletions
diff --git a/tests/ui/drop/drop_order.rs b/tests/ui/drop/drop_order.rs index d1a5b9bc5e2..b96e55a2535 100644 --- a/tests/ui/drop/drop_order.rs +++ b/tests/ui/drop/drop_order.rs @@ -2,9 +2,10 @@ //@ compile-flags: -Z validate-mir //@ revisions: edition2021 edition2024 //@ [edition2021] edition: 2021 +//@ [edition2024] compile-flags: -Z lint-mir //@ [edition2024] edition: 2024 -#![feature(let_chains)] +#![cfg_attr(edition2021, feature(let_chains))] use std::cell::RefCell; use std::convert::TryInto; diff --git a/tests/ui/drop/drop_order_if_let_rescope.rs b/tests/ui/drop/drop_order_if_let_rescope.rs index 7445e3a6a5f..27bced5fa62 100644 --- a/tests/ui/drop/drop_order_if_let_rescope.rs +++ b/tests/ui/drop/drop_order_if_let_rescope.rs @@ -1,8 +1,6 @@ //@ run-pass //@ edition:2024 -//@ compile-flags: -Z validate-mir - -#![feature(let_chains)] +//@ compile-flags: -Z validate-mir -Z lint-mir use std::cell::RefCell; use std::convert::TryInto; diff --git a/tests/ui/drop/issue-100276.rs b/tests/ui/drop/issue-100276.rs index b44710e7c3f..5d212b3a0a9 100644 --- a/tests/ui/drop/issue-100276.rs +++ b/tests/ui/drop/issue-100276.rs @@ -1,6 +1,11 @@ //@ check-pass //@ compile-flags: -Z validate-mir -#![feature(let_chains)] +//@ revisions: edition2021 edition2024 +//@ [edition2021] edition: 2021 +//@ [edition2024] compile-flags: -Z lint-mir +//@ [edition2024] edition: 2024 + +#![cfg_attr(edition2021, feature(let_chains))] fn let_chains(entry: std::io::Result<std::fs::DirEntry>) { if let Ok(entry) = entry |
