diff options
| author | nidnogg <henriquevt98@gmail.com> | 2022-08-22 12:14:49 -0300 |
|---|---|---|
| committer | nidnogg <henriquevt98@gmail.com> | 2022-08-22 12:14:49 -0300 |
| commit | 649749c7b040580abc6b0654584e3a580b1870d7 (patch) | |
| tree | 8609bb8fef03a526507565a89c8d70c14160e236 /compiler/rustc_const_eval/src/const_eval | |
| parent | 13abae2deba8cd27cdc9ec81f4291c9047eaa7e1 (diff) | |
Addressing last comment on PR review
Diffstat (limited to 'compiler/rustc_const_eval/src/const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/const_eval/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/const_eval/mod.rs b/compiler/rustc_const_eval/src/const_eval/mod.rs index 9041d55155e..cef74432102 100644 --- a/compiler/rustc_const_eval/src/const_eval/mod.rs +++ b/compiler/rustc_const_eval/src/const_eval/mod.rs @@ -72,12 +72,12 @@ pub(crate) fn eval_to_valtree<'tcx>( Ok(valtree) => Ok(Some(valtree)), Err(err) => { let did = cid.instance.def_id(); - let s = cid.display(tcx); + let global_const_id = cid.display(tcx); match err { ValTreeCreationError::NodesOverflow => { - let msg = format!("maximum number of nodes exceeded in constant {}", &s); + let msg = format!("maximum number of nodes exceeded in constant {}", &global_const_id); let mut diag = match tcx.hir().span_if_local(did) { - Some(span) => tcx.sess.create_err(MaxNumNodesInConstErr { span, s }), + Some(span) => tcx.sess.create_err(MaxNumNodesInConstErr { span, global_const_id }), None => tcx.sess.struct_err(&msg), }; diag.emit(); |
