error[E0308]: mismatched types
--> src/main.rs:12:5
|
5 | let updates = [async {}.then(|()| async move {
| _______________________________________-
6 | | &THING
7 | | })];
| | -
| | |
| |_____the expected `async` block
| the found `async` block
...
12 | foo()
| ^^^^^ one type is more general than the other
|
= note: expected `async` block `{async block@src/main.rs:5:39: 7:6}`
found `async` block `{async block@src/main.rs:5:39: 7:6}`
For more information about this error, try `rustc --explain E0308`.
error: could not compile `test_project` (bin "test_project") due to 1 previous error
The code compiles without the reference, so I'm guessing it's to do with the Future being made "unique" by that even though it doesn't actually contain any "real" captures that should make the closure different.
Code
Current output
Desired output
No response
Rationale and extra context
No response
Other cases
No response
Rust Version
Anything else?
The code compiles without the reference, so I'm guessing it's to do with the Future being made "unique" by that even though it doesn't actually contain any "real" captures that should make the closure different.