1
Fork 0

Hotfix ftl err name, added check for err.code in create_feature_err

This commit is contained in:
nidnogg 2022-08-21 13:08:14 -03:00
parent 4c82845b3a
commit 0a58b26e8a
3 changed files with 5 additions and 3 deletions

View file

@ -467,7 +467,9 @@ impl Session {
feature: Symbol,
) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
let mut err = self.parse_sess.create_err(err);
err.code = std::option::Option::Some(error_code!(E0658));
if err.code.is_none() {
err.code = std::option::Option::Some(error_code!(E0658));
}
add_feature_diagnostics(&mut err, &self.parse_sess, feature);
err
}