E0063#
Warning name: syntax_lint
Syntax lint warning.
This warning category is used for valid code patterns that the compiler accepts
but discourages. For example, wrapping a supplied optional argument in Some
is unnecessary:
///|
pub fn consume(value? : Int) -> Unit {
ignore(value)
}
///|
pub fn demo() -> Unit {
consume(value?=Some(42))
}
Suggestion#
Pass the value directly when supplying the optional argument:
///|
pub fn consume(value? : Int) -> Unit {
ignore(value)
}
///|
pub fn demo() -> Unit {
consume(value=42)
}
Other syntax lint diagnostics may report different anti-patterns and provide a suggestion specific to the code being checked.