mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
14 lines
681 B
Plaintext
14 lines
681 B
Plaintext
error[E0505]: cannot move out of `encoder` because it is borrowed
|
|
--> compile_tests/fail/rpass_lifetime.rs:16:22
|
|
|
|
|
12 | let mut encoder = device.create_command_encoder(&Default::default());
|
|
| ----------- binding `encoder` declared here
|
|
13 | let _render_pass = encoder.begin_render_pass(&Default::default());
|
|
| ------- borrow of `encoder` occurs here
|
|
...
|
|
16 | let cmd_buffer = encoder.finish();
|
|
| ^^^^^^^ move out of `encoder` occurs here
|
|
17 | queue.submit([cmd_buffer]);
|
|
18 | }
|
|
| - borrow might be used here, when `_render_pass` is dropped and runs the destructor for type `wgpu::RenderPass<'_>`
|