about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-05-25 18:07:44 +0200
committerGitHub <noreply@github.com>2020-05-25 18:07:44 +0200
commit65607fbf98caa02554af549acf1293a793734683 (patch)
treedcc90454098628c9ece5b64f1d155817d347f17d /src/libstd/sys/unix/stack_overflow.rs
parentd5250c160a9bb463d08a0073962fdd68e33391b4 (diff)
parentb6844489f9dc3ca7aa23c3111a4576099919d65f (diff)
downloadrust-65607fbf98caa02554af549acf1293a793734683.tar.gz
rust-65607fbf98caa02554af549acf1293a793734683.zip
Rollup merge of #72308 - Aaron1011:fix/hygiene-error-message, r=matthewjasper
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