Skip to content

Commit 81f50fd

Browse files
committed
Fix weird code setting in create_feature_err.
1 parent 3944301 commit 81f50fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_session/src/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ impl Session {
471471
) -> DiagnosticBuilder<'a> {
472472
let mut err = self.parse_sess.create_err(err);
473473
if err.code.is_none() {
474-
err.code = std::option::Option::Some(error_code!(E0658));
474+
err.code(error_code!(E0658));
475475
}
476476
add_feature_diagnostics(&mut err, &self.parse_sess, feature);
477477
err

0 commit comments

Comments
 (0)