pub enum ParamKind {
Prototype,
Void,
Empty,
Identifiers,
}Expand description
Which of the four shapes a function declarator’s parameter list has.
The distinction between ParamKind::Void and ParamKind::Empty is not pedantry. Before
C23, int f() says nothing about the parameters and int f(void) says there are none; in
C23 they mean the same thing. Projects moving to gnu23 hit exactly this, so the two are
told apart here and diagnosed where it matters.
Variants§
Prototype
A list of parameter declarations, named or abstract.
Void
(void).
Empty
().
Identifiers
A list of bare identifiers, which is an old-style definition’s parameter list.
Trait Implementations§
impl Copy for ParamKind
impl Eq for ParamKind
impl StructuralPartialEq for ParamKind
Auto Trait Implementations§
impl Freeze for ParamKind
impl RefUnwindSafe for ParamKind
impl Send for ParamKind
impl Sync for ParamKind
impl Unpin for ParamKind
impl UnsafeUnpin for ParamKind
impl UnwindSafe for ParamKind
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