Remove the symbol from ast::LitKind::Err
.
Because it's never used meaningfully.
This commit is contained in:
parent
fb5dc6b3e7
commit
6087dc2054
13 changed files with 17 additions and 19 deletions
|
@ -144,7 +144,7 @@ pub(crate) fn lit_to_mir_constant<'tcx>(
|
|||
}
|
||||
(ast::LitKind::Bool(b), ty::Bool) => ConstValue::Scalar(Scalar::from_bool(*b)),
|
||||
(ast::LitKind::Char(c), ty::Char) => ConstValue::Scalar(Scalar::from_char(*c)),
|
||||
(ast::LitKind::Err(_), _) => return Err(LitToConstError::Reported),
|
||||
(ast::LitKind::Err, _) => return Err(LitToConstError::Reported),
|
||||
_ => return Err(LitToConstError::TypeError),
|
||||
};
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ pub(crate) fn lit_to_const<'tcx>(
|
|||
}
|
||||
(ast::LitKind::Bool(b), ty::Bool) => ty::ValTree::from_scalar_int((*b).into()),
|
||||
(ast::LitKind::Char(c), ty::Char) => ty::ValTree::from_scalar_int((*c).into()),
|
||||
(ast::LitKind::Err(_), _) => return Err(LitToConstError::Reported),
|
||||
(ast::LitKind::Err, _) => return Err(LitToConstError::Reported),
|
||||
_ => return Err(LitToConstError::TypeError),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue