about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorTrevor Gross <t.gross35@gmail.com>2024-07-26 19:03:05 -0400
committerGitHub <noreply@github.com>2024-07-26 19:03:05 -0400
commitbd18f88dabdf4af5de1cfa180596fab3d503a734 (patch)
tree5533d5316374f22a8870b66b2a232a61b3850712 /tests/rustdoc-js-std/parser-errors.js
parent86721a4c90531cbf2d8e1c7124b527e30489782b (diff)
parent5a9959fd9daa17e77d609f3c2db4d18554484447 (diff)
downloadrust-bd18f88dabdf4af5de1cfa180596fab3d503a734.tar.gz
rust-bd18f88dabdf4af5de1cfa180596fab3d503a734.zip
Rollup merge of #128201 - compiler-errors:closure-clone, r=oli-obk
Implement `Copy`/`Clone` for async closures

We can do so in the same cases that regular closures do.

For the purposes of cloning, coroutine-closures are actually precisely the same as regular closures, specifically in the aspect that `Clone` impls care about which is the upvars. The only difference b/w coroutine-closures and regular closures is the type that they *return*, but this type has not been *created* yet, so we don't really have a problem.

IDK why I didn't add this impl initially -- I went back and forth a bit on the internal representation for coroutine-closures before settling on a design which largely models regular closures. Previous (not published) iterations of coroutine-closures used to be represented as a special (read: cursed) kind of coroutine, which would probably suffer from the pitfalls that coroutines have that oli mentioned below in https://github.com/rust-lang/rust/pull/128201#issuecomment-2251230274.

r? oli-obk
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions