Fix `ByMove` coroutine-closure shim (for 2021 precise closure capturing behavior...
source link: https://github.com/rust-lang/rust/pull/123518
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
This PR reworks the way that we perform the ByMove
coroutine-closure shim to account for the fact that the upvars of the outer coroutine-closure and the inner coroutine might not line up due to edition-2021 closure capture rules changes.
Specifically, the number of upvars may differ and/or the inner coroutine may have additional projections applied to an upvar. This PR reworks the information we pass into the ByMoveBody
MIR visitor to account for both of these facts.
I tried to leave comments explaining exactly what everything is doing, but let me know if you have questions.
r? oli-obk
Recommend
-
9
Rust pattern: Precise closure capture clauses Apr 24, 2018 This is the second in a series of posts about Rust compiler errors. Each one will talk about a particular error that I got recently and try to e...
-
3
A shim for window.orientation based on window.screen.orientationA shim for window.orientation based on window.screen.orientation 05 May 2014 Last week I wrote a Fire...
-
5
Copy link Contributor FabianWolff ...
-
0
A capturing lambda can be a coroutine, but you have to save your captures while you still can Raymond November 3rd, 2021
-
5
容器中的 Shim 到底是个什么鬼?-51CTO.COM 容器中的 Shim 到底是个什么鬼? 作者:Brian Goff 2022-02-16 20:04:08 Kubernetes 1.20 版开始废除了对 dockershim 的支持,改用 Containerd[1] 作为默认的容器...
-
4
“ Kubernetes v1.24 将于今年 4月正式发布,Docker S...
-
5
Switch A Switch shim for react-native-web Mar 09, 2022 1 min read React Native Switch A Switch shim for react-native-web...
-
11
Menu A MenuView shim for react-native-web Mar 08, 2022 1 min read React Native MenuView A <MenuView> shim for react-...
-
7
Requirejs shim: want to save backbone plugins directly in the main backbone advertisements I got two small Backbone plugins whic...
-
3
Conversation Member A follow-up t...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK