Stabilize let chains on edition 2024
This commit is contained in:
parent
1f76d219c9
commit
2e61af2fca
5 changed files with 38 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
// See `mir_drop_order.rs` for more information
|
||||
|
||||
#![feature(let_chains)]
|
||||
#![cfg_attr(edition2021, feature(let_chains))]
|
||||
#![allow(irrefutable_let_patterns)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue