Skip to content

Commit 2a7a391

Browse files
committed
auto merge of #14086 : Ryman/rust/resolve_error_suggestions, r=alexcrichton
Provides better help for the resolve failures inside an `impl` if the name matches: - a field on the self type - a method on the self type - a method on the current trait ref (in a trait impl) Not handling trait method suggestions if in a regular `impl` (as you can see on line 69 of the test), I believe it is possible though. Also, provides a better message when `self` fails to resolve due to being a static method. It's using some unsafe pointers to skip copying the larger structures (which are only used in error conditions); it's likely possible to get it working with lifetimes (all the useful refs should outlive the visitor calls) but I haven't really figured that out for this case. (can switch to copying code if wanted) Closes #2356.
2 parents 1a1645d + 595e291 commit 2a7a391

File tree

2 files changed

+325
-116
lines changed

2 files changed

+325
-116
lines changed

0 commit comments

Comments
 (0)