about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-02-10 13:12:31 +0100
committerGitHub <noreply@github.com>2024-02-10 13:12:31 +0100
commit55913368c53b2846bd96fd017abc34a0af07ccc8 (patch)
tree5c3cfc67941b0bf40c4ad3dec50f529e473ff23e /compiler/rustc_errors/src
parented3b049a8b234180f2e156dac358af4effb35f09 (diff)
parenta2479a4ae75884953eb9eaad083105174549c2ed (diff)
downloadrust-55913368c53b2846bd96fd017abc34a0af07ccc8.tar.gz
rust-55913368c53b2846bd96fd017abc34a0af07ccc8.zip
Rollup merge of #120870 - Zalathar:allow-min-spec, r=oli-obk
Allow restricted trait impls under `#[allow_internal_unstable(min_specialization)]`

This is a follow-up to #119963 and a companion to #120866, though it can land independently from the latter.

---

We have several compiler crates that only enable `#[feature(min_specialization)]` because it is required by their expansions of `newtype_index!`, in order to implement traits marked with `#[rustc_specialization_trait]`.

This PR allows those traits to be implemented internally by macros with `#[allow_internal_unstable(min_specialization)]`, without needing specialization to be enabled in the enclosing crate.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 7216fa8f5e4..ab3ad0e9d68 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -7,6 +7,7 @@
 #![allow(internal_features)]
 #![allow(rustc::diagnostic_outside_of_impl)]
 #![allow(rustc::untranslatable_diagnostic)]
+#![cfg_attr(bootstrap, feature(min_specialization))]
 #![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
 #![doc(rust_logo)]
 #![feature(array_windows)]
@@ -16,7 +17,6 @@
 #![feature(error_reporter)]
 #![feature(extract_if)]
 #![feature(let_chains)]
-#![feature(min_specialization)]
 #![feature(negative_impls)]
 #![feature(never_type)]
 #![feature(rustc_attrs)]