Point at local similarly named element and tweak references to variants
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.
This commit is contained in:
parent
0f677c65e8
commit
b26ddb8af3
132 changed files with 600 additions and 331 deletions
|
@ -27,11 +27,11 @@ fn main() {
|
|||
|
||||
match e4 {
|
||||
E::Empty4 => ()
|
||||
//~^ ERROR expected unit struct/variant or constant, found tuple variant `E::Empty4`
|
||||
//~^ ERROR expected unit struct, unit variant or constant, found tuple variant `E::Empty4`
|
||||
}
|
||||
match xe5 {
|
||||
XE::XEmpty5 => (),
|
||||
//~^ ERROR expected unit struct/variant or constant, found tuple variant `XE::XEmpty5`
|
||||
//~^ ERROR expected unit struct, unit variant or constant, found tuple variant `XE::XEmpty5`
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue