Skip to content

lots of multiple_unsafe_ops_per_block after toolchain update #11312

@ferologics

Description

@ferologics

Summary

bumping our toolchain version from nightly-2023-06-24 to nightly-2023-08-10 gives us a ton of multiple_unsafe_ops_per_block for external dependencies:

control_center/	note: unsafe function call occurs here
control_center/	   --> src/logic.rs:225:32
control_center/	    |
control_center/	225 |                           return kinesis
control_center/	    |  ________________________________^
control_center/	226 | |                             .put_data_into_main_kinesis_stream(
control_center/	227 | |                                 &account_id,
control_center/	228 | |                                 &device_id,
control_center/	...   |
control_center/	231 | |                             .map_err(ControlCenterError::FailedToPutItemIntoMainKinesisStream)
control_center/	232 | |                             .await;
control_center/	    | |__________________________________^
control_center/	    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block
control_center/	warning: this `unsafe` block contains 2 unsafe operations, expected only one
control_center/	   --> src/logic.rs:412:10
control_center/	    |
control_center/	412 |         .await;
control_center/	    |          ^^^^^
control_center/	    |
control_center/	note: unsafe function call occurs here
control_center/	   --> src/logic.rs:412:10
control_center/	    |
control_center/	412 |         .await;
control_center/	    |          ^^^^^
control_center/	note: unsafe function call occurs here
control_center/	   --> src/logic.rs:410:34
control_center/	    |
control_center/	410 |       let update_dynamodb_result = dynamodb
control_center/	    |  __________________________________^
control_center/	411 | |         .update_movement_status_connection(device_id, condition_version, new_connection)
control_center/	412 | |         .await;
control_center/	    | |______________^
control_center/	    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block
runtime_dependencies/	warning: this `unsafe` block contains 2 unsafe operations, expected only one
runtime_dependencies/	  --> src/tungstenite.rs:49:75
runtime_dependencies/	   |
runtime_dependencies/	49 |             send_message(internal_call_id, ws_id, message, handle_action).await;
runtime_dependencies/	   |                                                                           ^^^^^
runtime_dependencies/	   |
runtime_dependencies/	note: unsafe function call occurs here
runtime_dependencies/	  --> src/tungstenite.rs:49:75
runtime_dependencies/	   |
runtime_dependencies/	49 |             send_message(internal_call_id, ws_id, message, handle_action).await;
runtime_dependencies/	   |                                                                           ^^^^^
runtime_dependencies/	note: unsafe function call occurs here
runtime_dependencies/	  --> src/tungstenite.rs:49:13
runtime_dependencies/	   |
runtime_dependencies/	49 |             send_message(internal_call_id, ws_id, message, handle_action).await;
runtime_dependencies/	   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
runtime_dependencies/	   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block
runtime_dependencies/	warning: this `unsafe` block contains 2 unsafe operations, expected only one
runtime_dependencies/	   --> src/reqwest.rs:195:9
runtime_dependencies/	    |
runtime_dependencies/	195 | /         select! {
runtime_dependencies/	196 | |             _ = cloned_cancellation_token.cancelled() => {
runtime_dependencies/	197 | |                 drop(REQUEST_STORAGE.remove(&request_id));
runtime_dependencies/	198 | |                 // the send future will be dropped
runtime_dependencies/	...   |
runtime_dependencies/	207 | |             }
runtime_dependencies/	208 | |         }
runtime_dependencies/	    | |_________^
runtime_dependencies/	    |
runtime_dependencies/	note: unsafe function call occurs here
runtime_dependencies/	   --> src/reqwest.rs:195:9
runtime_dependencies/	    |
runtime_dependencies/	195 | /         select! {
runtime_dependencies/	196 | |             _ = cloned_cancellation_token.cancelled() => {
runtime_dependencies/	197 | |                 drop(REQUEST_STORAGE.remove(&request_id));
runtime_dependencies/	198 | |                 // the send future will be dropped
runtime_dependencies/	...   |
runtime_dependencies/	207 | |             }
runtime_dependencies/	208 | |         }
runtime_dependencies/	    | |_________^
runtime_dependencies/	note: unsafe function call occurs here
runtime_dependencies/	   --> src/reqwest.rs:195:9
runtime_dependencies/	    |
runtime_dependencies/	195 | /         select! {
runtime_dependencies/	196 | |             _ = cloned_cancellation_token.cancelled() => {
runtime_dependencies/	197 | |                 drop(REQUEST_STORAGE.remove(&request_id));
runtime_dependencies/	198 | |                 // the send future will be dropped
runtime_dependencies/	...   |
runtime_dependencies/	207 | |             }
runtime_dependencies/	208 | |         }
runtime_dependencies/	    | |_________^
runtime_dependencies/	    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_unsafe_ops_per_block

Lint Name

multiple_unsafe_ops_per_block

Reproducer

No response

Version

rustc 1.73.0-nightly (08d00b40a 2023-08-09)
binary: rustc
commit-hash: 08d00b40aef2017fe6dba3ff7d6476efa0c10888
commit-date: 2023-08-09
host: aarch64-apple-darwin
release: 1.73.0-nightly
LLVM version: 17.0.0

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions