#[derive(Clone, Debug)]
pub enum ConstEvalErrKind {
NeedsRfc(String),
- PtrToIntCast,
ConstAccessesStatic,
ModifiedGlobal,
AssertFailure(AssertKind<ConstInt>),
NeedsRfc(ref msg) => {
write!(f, "\"{}\" needs an rfc before being allowed inside constants", msg)
}
- PtrToIntCast => {
- write!(
- f,
- "cannot cast pointer to integer because it was not created by cast from integer"
- )
- }
ConstAccessesStatic => write!(f, "constant accesses static"),
ModifiedGlobal => {
write!(f, "modifying a static's initial value from another static's initializer")