emit feature help in cheat mode
This commit is contained in:
parent
ad81f11b01
commit
0dc2a95f1e
1 changed files with 5 additions and 6 deletions
|
@ -804,13 +804,12 @@ pub fn emit_feature_err(sess: &ParseSess, feature: &str, span: Span, issue: Gate
|
|||
};
|
||||
|
||||
// #23973: do not suggest `#![feature(...)]` if we are in beta/stable
|
||||
if option_env!("CFG_DISABLE_UNSTABLE_FEATURES").is_some() {
|
||||
err.emit();
|
||||
return;
|
||||
if sess.unstable_features.is_nightly_build() {
|
||||
err.help(&format!("add #![feature({})] to the \
|
||||
crate attributes to enable",
|
||||
feature));
|
||||
}
|
||||
err.help(&format!("add #![feature({})] to the \
|
||||
crate attributes to enable",
|
||||
feature));
|
||||
|
||||
err.emit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue