Tell users not to file a bug when using internal library features

This commit is contained in:
Michael Goulet 2024-07-25 15:13:39 -04:00
parent eb10639928
commit b5a03c75d5

View File

@ -117,6 +117,12 @@ fn feature_list(attr: &Attribute) -> ThinVec<ast::NestedMetaItem> {
// Otherwise, the feature is unknown. Record it as a lib feature.
// It will be checked later.
features.set_declared_lib_feature(name, mi.span());
// Similar to above, detect internal lib features to suppress
// the ICE message that asks for a report.
if features.internal(name) && ![sym::core, sym::alloc, sym::std].contains(&crate_name) {
sess.using_internal_features.store(true, std::sync::atomic::Ordering::Relaxed);
}
}
}