pub struct EnumInfo {
pub tag: Option<Symbol>,
pub underlying: Option<TypeId>,
pub fixed: bool,
}Expand description
What is known about one enum declaration.
Fields§
§tag: Option<Symbol>The tag, absent for an anonymous one.
underlying: Option<TypeId>The type the enumerators are represented in, absent until it is decided.
C23 lets the program write it, and before that it is chosen once every enumerator has been seen. Either way it is a fact about the declaration rather than about the type system, so it is recorded here and not derived twice.
fixed: boolWhether the underlying type was written by the program rather than chosen.
It changes the answer to what an enumerator’s own type is, and it decides whether an enumerator that does not fit is an error or a reason to widen.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumInfo
impl RefUnwindSafe for EnumInfo
impl Send for EnumInfo
impl Sync for EnumInfo
impl Unpin for EnumInfo
impl UnsafeUnpin for EnumInfo
impl UnwindSafe for EnumInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more