b26ddb8af3
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.
15 lines
259 B
Rust
15 lines
259 B
Rust
struct Foo;
|
|
|
|
trait MyTrait {
|
|
fn trait_bar() {}
|
|
}
|
|
|
|
impl MyTrait for Foo {}
|
|
|
|
fn main() {
|
|
match 0u32 {
|
|
<Foo as MyTrait>::trait_bar => {}
|
|
//~^ ERROR expected unit struct, unit variant or constant, found method `MyTrait::trait_bar`
|
|
}
|
|
}
|