Skip to content

Commit a68ecfd

Browse files
committed
if let guard stabilize
1 parent a33907a commit a68ecfd

File tree

146 files changed

+676
-730
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+676
-730
lines changed

compiler/rustc_ast/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
//! This API is completely unstable and subject to change.
66
77
// tidy-alphabetical-start
8+
#![cfg_attr(bootstrap, feature(if_let_guard))]
89
#![doc(test(attr(deny(warnings), allow(internal_features))))]
910
#![feature(associated_type_defaults)]
1011
#![feature(box_patterns)]
11-
#![feature(if_let_guard)]
1212
#![feature(iter_order_by)]
1313
#![feature(macro_metavar_expr)]
1414
#![recursion_limit = "256"]

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
//! in the HIR, especially for multiple identifiers.
3232
3333
// tidy-alphabetical-start
34+
#![cfg_attr(bootstrap, feature(if_let_guard))]
3435
#![feature(box_patterns)]
35-
#![feature(if_let_guard)]
3636
// tidy-alphabetical-end
3737

3838
use std::mem;

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -481,11 +481,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
481481
}
482482
};
483483
}
484-
gate_all!(
485-
if_let_guard,
486-
"`if let` guards are experimental",
487-
"you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`"
488-
);
489484
gate_all!(
490485
async_trait_bounds,
491486
"`async` trait bounds are unstable",

compiler/rustc_ast_passes/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
//! by `rustc_ast_lowering`.
44
55
// tidy-alphabetical-start
6+
#![cfg_attr(bootstrap, feature(if_let_guard))]
67
#![feature(box_patterns)]
7-
#![feature(if_let_guard)]
88
#![feature(iter_intersperse)]
99
#![feature(iter_is_partitioned)]
1010
// tidy-alphabetical-end

compiler/rustc_attr_parsing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
//! containing both `C` and `packed` annotations.
7878
7979
// tidy-alphabetical-start
80+
#![cfg_attr(bootstrap, feature(if_let_guard))]
8081
#![feature(decl_macro)]
81-
#![feature(if_let_guard)]
8282
#![feature(iter_intersperse)]
8383
#![recursion_limit = "256"]
8484
// tidy-alphabetical-end

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
55
#![cfg_attr(bootstrap, feature(assert_matches))]
6+
#![cfg_attr(bootstrap, feature(if_let_guard))]
67
#![feature(box_patterns)]
78
#![feature(default_field_values)]
89
#![feature(file_buffered)]
9-
#![feature(if_let_guard)]
1010
#![feature(negative_impls)]
1111
#![feature(never_type)]
1212
#![feature(rustc_attrs)]

compiler/rustc_builtin_macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// tidy-alphabetical-start
55
#![allow(internal_features)]
66
#![cfg_attr(bootstrap, feature(assert_matches))]
7+
#![cfg_attr(bootstrap, feature(if_let_guard))]
78
#![feature(box_patterns)]
89
#![feature(decl_macro)]
9-
#![feature(if_let_guard)]
1010
#![feature(iter_order_by)]
1111
#![feature(proc_macro_internals)]
1212
#![feature(proc_macro_quote)]

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
77
// tidy-alphabetical-start
88
#![cfg_attr(bootstrap, feature(assert_matches))]
9+
#![cfg_attr(bootstrap, feature(if_let_guard))]
910
#![feature(extern_types)]
1011
#![feature(file_buffered)]
11-
#![feature(if_let_guard)]
1212
#![feature(impl_trait_in_assoc_type)]
1313
#![feature(iter_intersperse)]
1414
#![feature(macro_derive)]

compiler/rustc_codegen_ssa/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// tidy-alphabetical-start
22
#![cfg_attr(bootstrap, feature(assert_matches))]
3+
#![cfg_attr(bootstrap, feature(if_let_guard))]
34
#![feature(box_patterns)]
45
#![feature(file_buffered)]
5-
#![feature(if_let_guard)]
66
#![feature(negative_impls)]
77
#![feature(string_from_utf8_lossy_owned)]
88
#![feature(trait_alias)]

compiler/rustc_const_eval/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// tidy-alphabetical-start
22
#![cfg_attr(bootstrap, feature(assert_matches))]
3+
#![cfg_attr(bootstrap, feature(if_let_guard))]
34
#![feature(array_try_map)]
45
#![feature(box_patterns)]
56
#![feature(decl_macro)]
6-
#![feature(if_let_guard)]
77
#![feature(never_type)]
88
#![feature(slice_ptr_get)]
99
#![feature(trait_alias)]

0 commit comments

Comments
 (0)