File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ pub(crate) struct TransientMutBorrowErrRaw {
8989}
9090
9191#[ derive( SessionDiagnostic ) ]
92- #[ error( const_eval:: const_evaL_max_num_nodes_in_const_err ) ]
92+ #[ error( const_eval:: max_num_nodes_in_const ) ]
9393pub ( crate ) struct MaxNumNodesInConstErr {
9494 #[ primary_span]
9595 pub span : Span ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const_eval_transient_mut_borrow = mutable references are not allowed in {$kind}s
3030
3131const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in { $kind } s
3232
33- const_evaL_max_num_nodes_in_const_err = maximum number of nodes exceeded in constant { $s }
33+ const_eval_max_num_nodes_in_const = maximum number of nodes exceeded in constant { $s }
3434
3535const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in { $kind } s
3636
Original file line number Diff line number Diff line change @@ -467,7 +467,9 @@ impl Session {
467467 feature : Symbol ,
468468 ) -> DiagnosticBuilder < ' a , ErrorGuaranteed > {
469469 let mut err = self . parse_sess . create_err ( err) ;
470- err. code = std:: option:: Option :: Some ( error_code ! ( E0658 ) ) ;
470+ if err. code . is_none ( ) {
471+ err. code = std:: option:: Option :: Some ( error_code ! ( E0658 ) ) ;
472+ }
471473 add_feature_diagnostics ( & mut err, & self . parse_sess , feature) ;
472474 err
473475 }
You can’t perform that action at this time.
0 commit comments