diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-25 15:13:39 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-25 15:13:49 -0400 |
| commit | b5a03c75d59fe7364181bb56ccd3706a992a59a9 (patch) | |
| tree | cd0ab7cf795ff085e8c188563b1745702240e1e8 /compiler/rustc_expand/src | |
| parent | eb10639928a2781cf0a12440007fbcc1e3a6888f (diff) | |
| download | rust-b5a03c75d59fe7364181bb56ccd3706a992a59a9.tar.gz rust-b5a03c75d59fe7364181bb56ccd3706a992a59a9.zip | |
Tell users not to file a bug when using internal library features
Diffstat (limited to 'compiler/rustc_expand/src')
| -rw-r--r-- | compiler/rustc_expand/src/config.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_expand/src/config.rs b/compiler/rustc_expand/src/config.rs index 6c02c237115..7ec59a1be83 100644 --- a/compiler/rustc_expand/src/config.rs +++ b/compiler/rustc_expand/src/config.rs @@ -117,6 +117,12 @@ pub fn features(sess: &Session, krate_attrs: &[Attribute], crate_name: Symbol) - // 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); + } } } |
