1
Fork 0

make some rustc_feature internals private, and ensure invariants with debug assertions

This commit is contained in:
Ralf Jung 2024-10-09 08:30:43 +02:00
parent 46ce5cbf33
commit 1381773e01
6 changed files with 62 additions and 26 deletions

View file

@ -2288,10 +2288,10 @@ impl EarlyLintPass for IncompleteInternalFeatures {
fn check_crate(&mut self, cx: &EarlyContext<'_>, _: &ast::Crate) {
let features = cx.builder.features();
features
.enabled_lang_features
.enabled_lang_features()
.iter()
.map(|(name, span, _)| (name, span))
.chain(features.enabled_lib_features.iter().map(|(name, span)| (name, span)))
.chain(features.enabled_lib_features().iter().map(|(name, span)| (name, span)))
.filter(|(&name, _)| features.incomplete(name) || features.internal(name))
.for_each(|(&name, &span)| {
if features.incomplete(name) {