Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.
10 lines
184 B
Rust
10 lines
184 B
Rust
struct S(u8, u16);
|
|
type A = S;
|
|
|
|
fn main() {
|
|
let s = A(0, 1); //~ ERROR expected function
|
|
match s {
|
|
A(..) => {} //~ ERROR expected tuple struct or tuple variant
|
|
}
|
|
}
|