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.
This commit is contained in:
Matthias Krüger 2024-02-10 13:12:31 +01:00 committed by GitHub
commit 55913368c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 25 additions and 14 deletions

View file

@ -24,7 +24,7 @@
#![feature(option_take_if)]
#![feature(never_type)]
#![feature(type_alias_impl_trait)]
#![feature(min_specialization)]
#![cfg_attr(bootstrap, feature(min_specialization))]
#![recursion_limit = "512"] // For rustdoc
#[macro_use]