rust: enable `clippy::undocumented_unsafe_blocks` lint · Rust-for-Linux/linux@db4f72c

@@ -513,6 +513,7 @@ macro_rules! __pinned_drop {

513513

}

514514

),

515515

) => {

516+

// SAFETY: TODO.

516517

unsafe $($impl_sig)* {

517518

// Inherit all attributes and the type/ident tokens for the signature.

518519

$(#[$($attr)*])*

@@ -872,6 +873,7 @@ macro_rules! __pin_data {

872873

}

873874

}

874875876+

// SAFETY: TODO.

875877

unsafe impl<$($impl_generics)*>

876878

$crate::init::__internal::PinData for __ThePinData<$($ty_generics)*>

877879

where $($whr)*

@@ -997,6 +999,7 @@ macro_rules! __pin_data {

997999

slot: *mut $p_type,

9981000

init: impl $crate::init::PinInit<$p_type, E>,

9991001

) -> ::core::result::Result<(), E> {

1002+

// SAFETY: TODO.

10001003

unsafe { $crate::init::PinInit::__pinned_init(init, slot) }

10011004

}

10021005

)*

@@ -1007,6 +1010,7 @@ macro_rules! __pin_data {

10071010

slot: *mut $type,

10081011

init: impl $crate::init::Init<$type, E>,

10091012

) -> ::core::result::Result<(), E> {

1013+

// SAFETY: TODO.

10101014

unsafe { $crate::init::Init::__init(init, slot) }

10111015

}

10121016

)*

@@ -1121,6 +1125,8 @@ macro_rules! __init_internal {

11211125

// no possibility of returning without `unsafe`.

11221126

struct __InitOk;

11231127

// Get the data about fields from the supplied type.

1128+

//

1129+

// SAFETY: TODO.

11241130

let data = unsafe {

11251131

use $crate::init::__internal::$has_data;

11261132

// Here we abuse `paste!` to retokenize `$t`. Declarative macros have some internal

@@ -1176,6 +1182,7 @@ macro_rules! __init_internal {

11761182

let init = move |slot| -> ::core::result::Result<(), $err> {

11771183

init(slot).map(|__InitOk| ())

11781184

};

1185+

// SAFETY: TODO.

11791186

let init = unsafe { $crate::init::$construct_closure::<_, $err>(init) };

11801187

init

11811188

}};

@@ -1324,6 +1331,8 @@ macro_rules! __init_internal {

13241331

// Endpoint, nothing more to munch, create the initializer.

13251332

// Since we are in the closure that is never called, this will never get executed.

13261333

// We abuse `slot` to get the correct type inference here:

1334+

//

1335+

// SAFETY: TODO.

13271336

unsafe {

13281337

// Here we abuse `paste!` to retokenize `$t`. Declarative macros have some internal

13291338

// information that is associated to already parsed fragments, so a path fragment