We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649749c commit 066796cCopy full SHA for 066796c
compiler/rustc_const_eval/src/const_eval/mod.rs
@@ -75,9 +75,14 @@ pub(crate) fn eval_to_valtree<'tcx>(
75
let global_const_id = cid.display(tcx);
76
match err {
77
ValTreeCreationError::NodesOverflow => {
78
- let msg = format!("maximum number of nodes exceeded in constant {}", &global_const_id);
+ let msg = format!(
79
+ "maximum number of nodes exceeded in constant {}",
80
+ &global_const_id
81
+ );
82
let mut diag = match tcx.hir().span_if_local(did) {
- Some(span) => tcx.sess.create_err(MaxNumNodesInConstErr { span, global_const_id }),
83
+ Some(span) => {
84
+ tcx.sess.create_err(MaxNumNodesInConstErr { span, global_const_id })
85
+ }
86
None => tcx.sess.struct_err(&msg),
87
};
88
diag.emit();
0 commit comments