diff --git a/wgpu-core/src/command/compute.rs b/wgpu-core/src/command/compute.rs index 9881e797d1c..8f7a4fcf4cb 100644 --- a/wgpu-core/src/command/compute.rs +++ b/wgpu-core/src/command/compute.rs @@ -309,8 +309,9 @@ impl Global { let (device_guard, mut token) = hub.devices.read(&mut token); let (mut cmd_buf_guard, mut token) = hub.command_buffers.write(&mut token); - let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, encoder_id) - .map_pass_err(init_scope)?; + let result = CommandBuffer::get_encoder_mut(&mut *cmd_buf_guard, encoder_id); + // Call using fully qualified syntax, to placate rust-analyzer. + let cmd_buf = MapPassErr::<&mut CommandBuffer, _>::map_pass_err(result, init_scope)?; // will be reset to true if recording is done without errors cmd_buf.status = CommandEncoderStatus::Error; let raw = cmd_buf.encoder.open(); diff --git a/wgpu-core/src/command/render.rs b/wgpu-core/src/command/render.rs index 2cd83a178f6..173b851a82c 100644 --- a/wgpu-core/src/command/render.rs +++ b/wgpu-core/src/command/render.rs @@ -1050,8 +1050,9 @@ impl Global { let (trackers, query_reset_state, pending_discard_init_fixups) = { let (mut cmb_guard, mut token) = hub.command_buffers.write(&mut token); - let cmd_buf = CommandBuffer::get_encoder_mut(&mut *cmb_guard, encoder_id) - .map_pass_err(init_scope)?; + let result = CommandBuffer::get_encoder_mut(&mut *cmb_guard, encoder_id); + // Call using fully qualified syntax, to placate rust-analyzer. + let cmd_buf = MapPassErr::<&mut CommandBuffer, _>::map_pass_err(result, init_scope)?; // close everything while the new command encoder is filled cmd_buf.encoder.close(); // will be reset to true if recording is done without errors