about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorAlyssa Verkade <alyssaverkade@gmail.com>2022-01-22 15:35:09 -0800
committerAlyssa Verkade <alyssaverkade@gmail.com>2022-01-22 16:21:16 -0800
commitb885700c7b1f8e9ba26e1f930dcb55ef56130b28 (patch)
treea0fa150b9abe48451760706884d99b53a1329f49 /library/std/src/sys/unix/stack_overflow.rs
parentecf72996eda4f8af19b0ca7235c6f62e0245a313 (diff)
downloadrust-b885700c7b1f8e9ba26e1f930dcb55ef56130b28.tar.gz
rust-b885700c7b1f8e9ba26e1f930dcb55ef56130b28.zip
[borrowck] Fix help on mutating &self in async fns
Previously, when rustc was provided an async function that tried to
mutate through a shared reference to an implicit self (as shown in the
ui test), rustc would suggest modifying the parameter signature
to `&mut` + the fully qualified name of the ty (in the case of the repro
`S`). If a user modified their code to match the suggestion, the
compiler would not accept it.

This commit modifies the suggestion so that when rustc is provided the
ui test that is also attached in this commit, it suggests (correctly)
`&mut self`. We try to be careful about distinguishing between implicit
and explicit self annotations, since the latter seem to be handled
correctly already.

Fixes rust-lang/rust#93093
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions