Adjust Safety annotation but also just silence lint warning
This external function declaration isn't able to be handled nicely by clippy in this case, so we suppress the lint. I also added a formatting fix to make it look more like other Safety sections. ``` error: unsafe function's docs miss `# Safety` section --> packages/modules/Bluetooth/system/rust/src/connection/ffi.rs:62:9 | 62 | / unsafe fn unchecked_register_rust_callbacks( 63 | | self: Pin<&mut Self>, 64 | | callbacks: Box<LeAclManagerCallbackShim>, 65 | | ); | |_________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc = note: `-D clippy::missing-safety-doc` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::missing_safety_doc)]` error: aborting due to 1 previous error ``` Bug: http://b/346588808 Test: ./toolchain/android_rust/tools/test_compiler.py --prebuilt-path dist/rust-linux.tar.xz --target aosp_cf_x86_64_phone --image --reuse-prebuilt Bug: 346588808 Test: m aosp_cf_x86_64_phone Change-Id: I015915f20cd97172bbc66913412da5f139a909de
Loading
Please register or sign in to comment