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>(
72
72
Ok ( valtree) => Ok ( Some ( valtree) ) ,
73
73
Err ( err) => {
74
74
let did = cid. instance . def_id ( ) ;
75
- let s = cid. display ( tcx) ;
75
+ let global_const_id = cid. display ( tcx) ;
76
76
match err {
77
77
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 ) ;
79
79
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 } ) ,
81
81
None => tcx. sess . struct_err ( & msg) ,
82
82
} ;
83
83
diag. emit ( ) ;
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ pub(crate) struct TransientMutBorrowErrRaw {
93
93
pub ( crate ) struct MaxNumNodesInConstErr {
94
94
#[ primary_span]
95
95
pub span : Span ,
96
- pub s : String ,
96
+ pub global_const_id : String ,
97
97
}
98
98
99
99
#[ 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
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 = 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 }
34
34
35
35
const_eval_unallowed_fn_pointer_call = function pointer calls are not allowed in { $kind } s
36
36
You can’t perform that action at this time.
0 commit comments