about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2020-05-17 18:28:12 -0400
committerAaron Hill <aa1ronham@gmail.com>2020-05-17 19:04:13 -0400
commitb6844489f9dc3ca7aa23c3111a4576099919d65f (patch)
tree7a59d3dc84ac41af5b759a0b0da68078104d307c /src/libstd/sys/unix/stack_overflow.rs
parentd79f1bd31a1401b5d08096fcdf9a9eb23ddf95df (diff)
downloadrust-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