Skip to content

Commit 7b5a15a

Browse files
committed
removed some feature gates for let_chains and reverted function names
1 parent f27980b commit 7b5a15a

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

tests/ui/mir/mir_match_guard_let_chains_drop_order.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
// See `mir_drop_order.rs` for more information
88

9-
#![cfg_attr(edition2021, feature(let_chains))]
109
#![allow(irrefutable_let_patterns)]
1110

1211
use std::cell::RefCell;

tests/ui/nll/match-guards-partially-borrow.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn ok_mutation_in_if_guard(mut q: i32) {
1414
}
1515
}
1616

17-
fn ok_mutation_in_(mut q: i32) {
17+
fn ok_mutation_in_if_let_guard(mut q: i32) {
1818
match q {
1919
// OK, mutation doesn't change which patterns g matches
2020
_ if let Some(()) = { q = 1; None } => (),
@@ -81,7 +81,7 @@ fn ok_indirect_mutation_in_if_guard(mut p: &bool) {
8181
}
8282
}
8383

84-
fn ok_indirect_mutation_in_(mut p: &bool) {
84+
fn ok_indirect_mutation_in_if_let_guard(mut p: &bool) {
8585
match *p {
8686
// OK, mutation doesn't change which patterns s matches
8787
_ if let Some(()) = {
@@ -103,7 +103,7 @@ fn mutation_invalidates_pattern_in_if_guard(mut q: bool) {
103103
}
104104
}
105105

106-
fn mutation_invalidates_pattern_in_(mut q: bool) {
106+
fn mutation_invalidates_pattern_in_if_let_guard(mut q: bool) {
107107
match q {
108108
// q doesn't match the pattern with the guard by the end of the guard.
109109
false if let Some(()) = {
@@ -126,7 +126,7 @@ fn mutation_invalidates_previous_pattern_in_if_guard(mut r: bool) {
126126
}
127127
}
128128

129-
fn mutation_invalidates_previous_pattern_in_(mut r: bool) {
129+
fn mutation_invalidates_previous_pattern_in_if_let_guard(mut r: bool) {
130130
match r {
131131
// r matches a previous pattern by the end of the guard.
132132
true => (),
@@ -151,7 +151,7 @@ fn match_on_borrowed_early_end_if_guard(mut s: bool) {
151151
}
152152
}
153153

154-
fn match_on_borrowed_early_end_(mut s: bool) {
154+
fn match_on_borrowed_early_end_if_let_guard(mut s: bool) {
155155
let h = &mut s;
156156
// OK value of s is unused before modification.
157157
match s {
@@ -175,7 +175,7 @@ fn bad_mutation_in_if_guard(mut t: bool) {
175175
}
176176
}
177177

178-
fn bad_mutation_in_(mut t: bool) {
178+
fn bad_mutation_in_if_let_guard(mut t: bool) {
179179
match t {
180180
true => (),
181181
false if let Some(()) = {
@@ -249,7 +249,7 @@ fn bad_indirect_mutation_in_if_guard(mut y: &bool) {
249249
}
250250
}
251251

252-
fn bad_indirect_mutation_in_(mut y: &bool) {
252+
fn bad_indirect_mutation_in_if_let_guard(mut y: &bool) {
253253
match *y {
254254
true => (),
255255
false if let Some(()) = {

tests/ui/rfcs/rfc-2294-if-let-guard/shadowing.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
//@[edition2021] edition:2021
66
//@[edition2024] edition:2024
77

8-
#![cfg_attr(edition2021, feature(let_chains))]
9-
108
fn main() {
119
let x: Option<Option<i32>> = Some(Some(6));
1210
match x {

tests/ui/rfcs/rfc-2294-if-let-guard/temporary-early-drop.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
//@ check-pass
66

77
#![allow(irrefutable_let_patterns)]
8-
#![cfg_attr(edition2021, feature(let_chains))]
98

109
struct Pd;
1110

0 commit comments

Comments
 (0)