about summary refs log tree commit diff
path: root/library/std/src/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-02 19:34:02 +0100
committerGitHub <noreply@github.com>2022-02-02 19:34:02 +0100
commitb622552e1002739a279a1e3a151ca2a241c94ead (patch)
tree7ccaa587b51ad012fcccce581cb9a686d64af301 /library/std/src/sys/unix/stack_overflow.rs
parent21ffe45631072bd7755a01d1acf9971f82e7fc37 (diff)
parentb885700c7b1f8e9ba26e1f930dcb55ef56130b28 (diff)
downloadrust-b622552e1002739a279a1e3a151ca2a241c94ead.tar.gz
rust-b622552e1002739a279a1e3a151ca2a241c94ead.zip
Rollup merge of #93221 - alyssaverkade:fix-93093, r=wesleywiser
[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.

This is my first PR here so I'm pretty sure I probably missed something/could use better terminology. I also didn't try to make the match exhaustive since implicit self is the only real special case that I need to handle (that I'm aware of), and I'm pretty sure there's a cleaner way to do this so any advice would be greatly appreciated! (I'm also not terribly confident about how I wrote the ui tests)

here is your cc as requested `@compiler-errors`

This is an attempt to fix #93093
Diffstat (limited to 'library/std/src/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions