use vize_l0::String;
use crate::scope::ScopeTag;
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ForParts {
pub tag: ScopeTag,
pub value: ForName,
pub key: ForName,
pub index: ForName,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ForName {
Named(String),
Pending,
Absent,
}
impl ForName {
#[inline]
pub fn spell(&self) -> &str {
match self {
ForName::Named(name) => name.as_str(),
ForName::Pending => "?",
ForName::Absent => "-",
}
}
}
const _: () = {
const fn assert_owned<T: 'static>() {}
assert_owned::<ForName>();
assert_owned::<ForParts>();
};
#[cfg(target_pointer_width = "64")]
const _: () = {
assert!(core::mem::size_of::<ForName>() == 24);
assert!(core::mem::size_of::<ForParts>() == 80);
};