Expand description
Hint for a file that fails to parse because a Rust ... parameter is not the
last one (#1737).
Rustโs ... parameter parses only in last position, so a file holding
fn f(sources: ..., dosing_type: Strs) fails syn::parse_file and no rule
checks it. hint tokenizes the source (which still works, and drops
comments) and names the cause and the &Dots spelling, for the lint to
append to its โfailed to parseโ warning.
Mirror: miniextendr-macros/src/misplaced_dots.rs gives #[miniextendr] the
same error. Keep the detector and message in sync.
Re-exportsยง
use proc_macro2::Delimiter;๐use proc_macro2::Spacing;๐use proc_macro2::TokenStream;๐use proc_macro2::TokenTree;๐
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. - hint ๐
- The hint for a source file that holds a
...parameter with another parameter after it:line N: <message>.Nonewhen it holds none or does not tokenize. - 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.