diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index 9f1609a559568..fba9483bc5a85 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -24,6 +24,8 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] +#![cfg_attr(bootstrap, feature(exhaustive_patterns))] +#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))] #![feature(rustdoc_internals)] #![feature(allocator_api)] #![feature(array_windows)] @@ -32,7 +34,6 @@ #![feature(core_intrinsics)] #![feature(const_type_name)] #![feature(discriminant_kind)] -#![feature(exhaustive_patterns)] #![feature(coroutines)] #![feature(if_let_guard)] #![feature(inline_const)] diff --git a/compiler/rustc_target/src/lib.rs b/compiler/rustc_target/src/lib.rs index bffb3681f1309..a0b61ae95ce0a 100644 --- a/compiler/rustc_target/src/lib.rs +++ b/compiler/rustc_target/src/lib.rs @@ -9,9 +9,10 @@ #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")] #![doc(rust_logo)] +#![cfg_attr(bootstrap, feature(exhaustive_patterns))] +#![cfg_attr(not(bootstrap), feature(min_exhaustive_patterns))] #![feature(rustdoc_internals)] #![feature(assert_matches)] -#![feature(exhaustive_patterns)] #![feature(iter_intersperse)] #![feature(let_chains)] #![feature(min_specialization)]