1 error[E0373]: async block may outlive the current function, but it borrows `room_ref`, which is owned by the current function
2 --> $DIR/issue-78938-async-block.rs:8:39
4 LL | let gameloop_handle = spawn(async {
5 | _______________________________________^
6 LL | | game_loop(Arc::clone(&room_ref))
7 | | -------- `room_ref` is borrowed here
9 | |_____^ may outlive borrowed value `room_ref`
11 = note: async blocks are not executed immediately and must either take a reference or ownership of outside variables they use
12 help: to force the async block to take ownership of `room_ref` (and any other referenced variables), use the `move` keyword
14 LL | let gameloop_handle = spawn(async move {
17 error: aborting due to previous error
19 For more information about this error, try `rustc --explain E0373`.