Skip to content

Commit b5a03c7

Browse files
Tell users not to file a bug when using internal library features
1 parent eb10639 commit b5a03c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: compiler/rustc_expand/src/config.rs

+6
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) -
117117
// Otherwise, the feature is unknown. Record it as a lib feature.
118118
// It will be checked later.
119119
features.set_declared_lib_feature(name, mi.span());
120+
121+
// Similar to above, detect internal lib features to suppress
122+
// the ICE message that asks for a report.
123+
if features.internal(name) && ![sym::core, sym::alloc, sym::std].contains(&crate_name) {
124+
sess.using_internal_features.store(true, std::sync::atomic::Ordering::Relaxed);
125+
}
120126
}
121127
}
122128

0 commit comments

Comments
 (0)