[−][src]Struct libslide::parser::errors::IllegalVariable
Variables are illegal in a slide expression pattern.
In most cases, this error is fired because you intended to evaluate an expression with slide, or wrote a variable in place of a variable pattern.
Because expression patterns are meant to abstract over and match expressions, there is generally not a need to explicitly define the name of a variable to be matched by an expression pattern. Rather, the concern is generally with the shape of the variable; that is, that it is actually a variable. For this use case, the "${name}" pattern (where "{name}" is a text placeholder) serves as a variable-matching pattern.
As a concrete example, the expression pattern $a + $b + $a
matches both the expressions
a + b + a
and b + a + b
. Both expressions are lowered the same way despite having
different variable names, so variable patterns permit abstraction and common representation
over the names.
Trait Implementations
impl DiagnosticRecord for IllegalVariable
[src]
Auto Trait Implementations
impl RefUnwindSafe for IllegalVariable
impl Send for IllegalVariable
impl Sync for IllegalVariable
impl Unpin for IllegalVariable
impl UnwindSafe for IllegalVariable
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,