#[non_exhaustive]pub enum Context {
Show 18 variants
Expression,
Statement,
Item,
Member,
Pattern,
Type,
Path,
Name,
Parameter,
Argument,
Arm,
Capture,
Field,
Variant,
Generic,
Entry,
Segment,
Label,
}Expand description
The context a construct was lowered in, for problem messages.
§Examples
use lower_lang::Context;
assert_eq!(Context::Pattern.to_string(), "a pattern");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Expression
An expression.
Statement
A statement in a block or module body.
Item
A declaration (module or block item).
Member
A member of a class, interface, or impl.
Pattern
A pattern.
Type
A type.
Path
A path.
Name
A name.
Parameter
A parameter.
Argument
A call argument.
Arm
A match arm or catch clause.
Capture
A closure capture.
Field
A record, variant, or class field.
Variant
A sum variant.
Generic
A generic parameter, argument, or where-predicate.
Entry
A map entry or field initializer.
Segment
A path segment.
Label
A label.
Trait Implementations§
impl Copy for Context
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
impl UnwindSafe for Context
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