Fix weird code setting in create_feature_err.

This commit is contained in:
Nicholas Nethercote 2023-12-22 08:41:15 +11:00
parent 394430166e
commit 81f50fd7e3

View file

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