pub enum Designator {
Field(Symbol),
Index(ExprId),
Range {
lo: ExprId,
hi: ExprId,
},
ObsoleteField(Symbol),
}Expand description
One step of a designation, or of a __builtin_offsetof member path.
Variants§
Field(Symbol)
.name.
Index(ExprId)
[index].
Range
[lo ... hi], GNU’s range, which initializes a run of elements with one value.
ObsoleteField(Symbol)
name:, the form GCC had before C99 and still accepts, with a warning under
-pedantic. Kept apart from Designator::Field so the printer puts back what was
written and so the diagnostic can point at the right thing.
Trait Implementations§
Source§impl Clone for Designator
impl Clone for Designator
Source§fn clone(&self) -> Designator
fn clone(&self) -> Designator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Designator
Source§impl Debug for Designator
impl Debug for Designator
impl Eq for Designator
Source§impl PartialEq for Designator
impl PartialEq for Designator
impl StructuralPartialEq for Designator
Auto Trait Implementations§
impl Freeze for Designator
impl RefUnwindSafe for Designator
impl Send for Designator
impl Sync for Designator
impl Unpin for Designator
impl UnsafeUnpin for Designator
impl UnwindSafe for Designator
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