Skip to content

Commit 48dbd58

Browse files
committed
if let guard stabilize
1 parent a413f77 commit 48dbd58

File tree

141 files changed

+514
-767
lines changed

Some content is hidden

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

141 files changed

+514
-767
lines changed

compiler/rustc_ast/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9+
#![cfg_attr(bootstrap, feature(if_let_guard))]
910
#![doc(
1011
html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/",
1112
test(attr(deny(warnings)))
@@ -14,7 +15,6 @@
1415
#![feature(array_windows)]
1516
#![feature(associated_type_defaults)]
1617
#![feature(box_patterns)]
17-
#![feature(if_let_guard)]
1818
#![feature(macro_metavar_expr)]
1919
#![feature(rustdoc_internals)]
2020
#![recursion_limit = "256"]

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@
3232
3333
// tidy-alphabetical-start
3434
#![allow(internal_features)]
35+
#![cfg_attr(bootstrap, feature(if_let_guard))]
3536
#![doc(rust_logo)]
3637
#![feature(box_patterns)]
37-
#![feature(if_let_guard)]
38+
#![feature(exact_size_is_empty)]
3839
#![feature(rustdoc_internals)]
3940
// tidy-alphabetical-end
4041

compiler/rustc_ast_passes/src/feature_gate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,6 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
464464
}
465465
};
466466
}
467-
gate_all!(
468-
if_let_guard,
469-
"`if let` guards are experimental",
470-
"you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`"
471-
);
472467
gate_all!(
473468
async_trait_bounds,
474469
"`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
@@ -4,9 +4,9 @@
44
55
// tidy-alphabetical-start
66
#![allow(internal_features)]
7+
#![cfg_attr(bootstrap, feature(if_let_guard))]
78
#![doc(rust_logo)]
89
#![feature(box_patterns)]
9-
#![feature(if_let_guard)]
1010
#![feature(iter_is_partitioned)]
1111
#![feature(rustdoc_internals)]
1212
// tidy-alphabetical-end

compiler/rustc_borrowck/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
33
// tidy-alphabetical-start
44
#![allow(internal_features)]
5+
#![cfg_attr(bootstrap, feature(if_let_guard))]
56
#![doc(rust_logo)]
67
#![feature(assert_matches)]
78
#![feature(box_patterns)]
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
#![allow(internal_features)]
66
#![allow(rustc::diagnostic_outside_of_impl)]
77
#![allow(rustc::untranslatable_diagnostic)]
8+
#![cfg_attr(bootstrap, feature(if_let_guard))]
9+
#![cfg_attr(not(bootstrap), feature(autodiff))]
810
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
911
#![doc(rust_logo)]
1012
#![feature(assert_matches)]
1113
#![feature(autodiff)]
1214
#![feature(box_patterns)]
1315
#![feature(decl_macro)]
14-
#![feature(if_let_guard)]
1516
#![feature(proc_macro_internals)]
1617
#![feature(proc_macro_quote)]
1718
#![feature(rustdoc_internals)]

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
77
// tidy-alphabetical-start
88
#![allow(internal_features)]
9+
#![cfg_attr(bootstrap, feature(if_let_guard))]
910
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1011
#![doc(rust_logo)]
1112
#![feature(assert_matches)]
1213
#![feature(extern_types)]
1314
#![feature(file_buffered)]
14-
#![feature(if_let_guard)]
1515
#![feature(impl_trait_in_assoc_type)]
1616
#![feature(iter_intersperse)]
1717
#![feature(rustdoc_internals)]

compiler/rustc_codegen_ssa/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
44
#![allow(rustc::untranslatable_diagnostic)]
5+
#![cfg_attr(bootstrap, feature(if_let_guard))]
56
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
67
#![doc(rust_logo)]
78
#![feature(assert_matches)]
89
#![feature(box_patterns)]
910
#![feature(file_buffered)]
10-
#![feature(if_let_guard)]
1111
#![feature(negative_impls)]
1212
#![feature(rustdoc_internals)]
1313
#![feature(string_from_utf8_lossy_owned)]

compiler/rustc_const_eval/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// tidy-alphabetical-start
22
#![allow(internal_features)]
33
#![allow(rustc::diagnostic_outside_of_impl)]
4+
#![cfg_attr(bootstrap, feature(if_let_guard))]
45
#![doc(rust_logo)]
56
#![feature(assert_matches)]
67
#![feature(box_patterns)]
78
#![feature(decl_macro)]
8-
#![feature(if_let_guard)]
99
#![feature(never_type)]
1010
#![feature(rustdoc_internals)]
1111
#![feature(slice_ptr_get)]

compiler/rustc_errors/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#![allow(rustc::diagnostic_outside_of_impl)]
99
#![allow(rustc::direct_use_of_rustc_type_ir)]
1010
#![allow(rustc::untranslatable_diagnostic)]
11+
#![cfg_attr(bootstrap, feature(if_let_guard))]
1112
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
1213
#![doc(rust_logo)]
1314
#![feature(array_windows)]

0 commit comments

Comments
 (0)