File tree 2 files changed +10
-4
lines changed 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -309,8 +309,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
309
309
let ( device_guard, mut token) = hub. devices . read ( & mut token) ;
310
310
311
311
let ( mut cmd_buf_guard, mut token) = hub. command_buffers . write ( & mut token) ;
312
- let cmd_buf = CommandBuffer :: get_encoder_mut ( & mut * cmd_buf_guard, encoder_id)
313
- . map_pass_err ( init_scope) ?;
312
+ // Spell out the type, to placate rust-analyzer.
313
+ // https://github.com/rust-lang/rust-analyzer/issues/12247
314
+ let cmd_buf: & mut CommandBuffer < A > =
315
+ CommandBuffer :: get_encoder_mut ( & mut * cmd_buf_guard, encoder_id)
316
+ . map_pass_err ( init_scope) ?;
314
317
// will be reset to true if recording is done without errors
315
318
cmd_buf. status = CommandEncoderStatus :: Error ;
316
319
let raw = cmd_buf. encoder . open ( ) ;
Original file line number Diff line number Diff line change @@ -1050,8 +1050,11 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
1050
1050
let ( trackers, query_reset_state, pending_discard_init_fixups) = {
1051
1051
let ( mut cmb_guard, mut token) = hub. command_buffers . write ( & mut token) ;
1052
1052
1053
- let cmd_buf = CommandBuffer :: get_encoder_mut ( & mut * cmb_guard, encoder_id)
1054
- . map_pass_err ( init_scope) ?;
1053
+ // Spell out the type, to placate rust-analyzer.
1054
+ // https://github.com/rust-lang/rust-analyzer/issues/12247
1055
+ let cmd_buf: & mut CommandBuffer < A > =
1056
+ CommandBuffer :: get_encoder_mut ( & mut * cmb_guard, encoder_id)
1057
+ . map_pass_err ( init_scope) ?;
1055
1058
// close everything while the new command encoder is filled
1056
1059
cmd_buf. encoder . close ( ) ;
1057
1060
// will be reset to true if recording is done without errors
You can’t perform that action at this time.
0 commit comments