Addressing tidy check fail
This commit is contained in:
parent
649749c7b0
commit
066796cece
1 changed files with 7 additions and 2 deletions
|
@ -75,9 +75,14 @@ pub(crate) fn eval_to_valtree<'tcx>(
|
|||
let global_const_id = cid.display(tcx);
|
||||
match err {
|
||||
ValTreeCreationError::NodesOverflow => {
|
||||
let msg = format!("maximum number of nodes exceeded in constant {}", &global_const_id);
|
||||
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, global_const_id }),
|
||||
Some(span) => {
|
||||
tcx.sess.create_err(MaxNumNodesInConstErr { span, global_const_id })
|
||||
}
|
||||
None => tcx.sess.struct_err(&msg),
|
||||
};
|
||||
diag.emit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue