From dbe2636dd2774c2d37ef42d73e8f0d3a1b1355bd Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 7 Feb 2024 16:21:07 +0100 Subject: [PATCH] Use `min_exhaustive_patterns` in core & std --- library/core/src/lib.rs | 3 ++- library/std/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/core/src/lib.rs b/library/core/src/lib.rs index 0f7885769c267..3bf645a9e5e72 100644 --- a/library/core/src/lib.rs +++ b/library/core/src/lib.rs @@ -203,7 +203,9 @@ // Language features: // tidy-alphabetical-start #![cfg_attr(bootstrap, feature(diagnostic_namespace))] +#![cfg_attr(bootstrap, feature(exhaustive_patterns))] #![cfg_attr(bootstrap, feature(platform_intrinsics))] +#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))] #![feature(abi_unadjusted)] #![feature(adt_const_params)] #![feature(allow_internal_unsafe)] @@ -228,7 +230,6 @@ #![feature(doc_cfg_hide)] #![feature(doc_notable_trait)] #![feature(effects)] -#![feature(exhaustive_patterns)] #![feature(extern_types)] #![feature(fundamental)] #![feature(generic_arg_infer)] diff --git a/library/std/src/lib.rs b/library/std/src/lib.rs index 55a5292a4a41b..4bf2b51060eaa 100644 --- a/library/std/src/lib.rs +++ b/library/std/src/lib.rs @@ -270,7 +270,9 @@ // // Language features: // tidy-alphabetical-start +#![cfg_attr(bootstrap, feature(exhaustive_patterns))] #![cfg_attr(bootstrap, feature(platform_intrinsics))] +#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))] #![feature(alloc_error_handler)] #![feature(allocator_internals)] #![feature(allow_internal_unsafe)] @@ -289,7 +291,6 @@ #![feature(doc_masked)] #![feature(doc_notable_trait)] #![feature(dropck_eyepatch)] -#![feature(exhaustive_patterns)] #![feature(if_let_guard)] #![feature(intra_doc_pointers)] #![feature(lang_items)]