File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ pub(crate) fn eval_to_valtree<'tcx>(
7272 Ok ( valtree) => Ok ( Some ( valtree) ) ,
7373 Err ( err) => {
7474 let did = cid. instance . def_id ( ) ;
75- let s = cid. display ( tcx) ;
75+ let global_const_id = cid. display ( tcx) ;
7676 match err {
7777 ValTreeCreationError :: NodesOverflow => {
78- let msg = format ! ( "maximum number of nodes exceeded in constant {}" , & s ) ;
78+ let msg = format ! ( "maximum number of nodes exceeded in constant {}" , & global_const_id ) ;
7979 let mut diag = match tcx. hir ( ) . span_if_local ( did) {
80- Some ( span) => tcx. sess . create_err ( MaxNumNodesInConstErr { span, s } ) ,
80+ Some ( span) => tcx. sess . create_err ( MaxNumNodesInConstErr { span, global_const_id } ) ,
8181 None => tcx. sess . struct_err ( & msg) ,
8282 } ;
8383 diag. emit ( ) ;
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ pub(crate) struct TransientMutBorrowErrRaw {
9393pub ( crate ) struct MaxNumNodesInConstErr {
9494 #[ primary_span]
9595 pub span : Span ,
96- pub s : String ,
96+ pub global_const_id : String ,
9797}
9898
9999#[ derive( SessionDiagnostic ) ]
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 = maximum number of nodes exceeded in constant { $s }
33+ const_eval_max_num_nodes_in_const = maximum number of nodes exceeded in constant { $global_const_id }
3434
3535const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in { $kind } s
3636
You can’t perform that action at this time.
0 commit comments