give a hint which feature is missing
This commit is contained in:
parent
822762c966
commit
f235b6f9c6
6 changed files with 36 additions and 19 deletions
|
@ -155,6 +155,7 @@ pub fn feature_warn_issue(
|
|||
}
|
||||
|
||||
/// Adds the diagnostics for a feature to an existing error.
|
||||
/// Must be a language feature!
|
||||
pub fn add_feature_diagnostics<G: EmissionGuarantee>(
|
||||
err: &mut Diag<'_, G>,
|
||||
sess: &Session,
|
||||
|
|
|
@ -300,6 +300,7 @@ impl Session {
|
|||
self.opts.test
|
||||
}
|
||||
|
||||
/// `feature` must be a language feature.
|
||||
#[track_caller]
|
||||
pub fn create_feature_err<'a>(&'a self, err: impl Diagnostic<'a>, feature: Symbol) -> Diag<'a> {
|
||||
let mut err = self.dcx().create_err(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue