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
|
@ -9,6 +9,6 @@ impl MyTrait for Foo {}
|
|||
fn main() {
|
||||
match 0u32 {
|
||||
<Foo as MyTrait>::trait_bar => {}
|
||||
//~^ ERROR expected unit struct/variant or constant, found method `MyTrait::trait_bar`
|
||||
//~^ ERROR expected unit struct, unit variant or constant, found method `MyTrait::trait_bar`
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue