File tree 3 files changed +5
-3
lines changed
rustc_error_messages/locales/en-US
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 {
89
89
}
90
90
91
91
#[ derive( SessionDiagnostic ) ]
92
- #[ error( const_eval:: const_evaL_max_num_nodes_in_const_err ) ]
92
+ #[ error( const_eval:: max_num_nodes_in_const ) ]
93
93
pub ( crate ) struct MaxNumNodesInConstErr {
94
94
#[ primary_span]
95
95
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
30
30
31
31
const_eval_transient_mut_borrow_raw = raw mutable references are not allowed in { $kind } s
32
32
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 }
34
34
35
35
const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in { $kind } s
36
36
Original file line number Diff line number Diff line change @@ -467,7 +467,9 @@ impl Session {
467
467
feature : Symbol ,
468
468
) -> DiagnosticBuilder < ' a , ErrorGuaranteed > {
469
469
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
+ }
471
473
add_feature_diagnostics ( & mut err, & self . parse_sess , feature) ;
472
474
err
473
475
}
You can’t perform that action at this time.
0 commit comments