diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2020-05-17 18:28:12 -0400 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2020-05-17 19:04:13 -0400 |
| commit | b6844489f9dc3ca7aa23c3111a4576099919d65f (patch) | |
| tree | 7a59d3dc84ac41af5b759a0b0da68078104d307c /src/libstd/sys/unix/stack_overflow.rs | |
| parent | d79f1bd31a1401b5d08096fcdf9a9eb23ddf95df (diff) | |
| download | rust-b6844489f9dc3ca7aa23c3111a4576099919d65f.tar.gz rust-b6844489f9dc3ca7aa23c3111a4576099919d65f.zip | |
Emit a better diagnostic when function actually has a 'self' parameter
Fixes #66898 When we are unable to resolve a reference to `self`, we current assume that the containing function doesn't have a `self` parameter, and emit an error message accordingly. However, if the reference to `self` was created by a macro invocation, then resolution will correctly fail, due to hygiene. In this case, we don't want to tell the user that the containing fuction doesn't have a 'self' paramter if it actually has one. This PR checks for the precense of a 'self' parameter, and adjusts the error message we emit accordingly. TODO: The exact error message we emit could probably be improved. Should we explicitly mention hygiene?
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
