Expand description
Diagnostic for a Rust ... parameter that is not the last one (#1737).
Rust’s ... parameter parses only in last position, so
fn f(sources: ..., dosing_type: Strs) is not a function to syn. The item
fails ItemFn (and, as a method, ItemImpl / ItemTrait), which would leave
#[miniextendr] with its struct/enum message. find recognises that shape
at token level so the fallback can name the cause and the &Dots spelling.
Mirror: miniextendr-lint/src/misplaced_dots.rs appends the same text to the
lint’s “failed to parse” warning. Keep the detector and message in sync.
Structs§
- Misplaced
Dots 🔒 - A Rust
...parameter followed by another parameter.
Functions§
- dots_at 🔒
- The three
.tokens of a...that starts attts[i]. - find 🔒
- The first
...parameter that another parameter follows, in anyfnsignature intokens. - in_
params 🔒 - A
...parameter inparamswith another parameter after it (a trailing comma is fine). - message 🔒
- The diagnostic for a
...parameter that is not last, namedname(Nonefor unnamed dots). - params_
group 🔒 - The parameter list after
fn name: the first parenthesized group outside the generics’ angle brackets.