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.
516517unsafe $($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.
875877unsafe impl<$($impl_generics)*>
876878 $crate::init::__internal::PinData for __ThePinData<$($ty_generics)*>
877879where $($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.
10001003unsafe { $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.
10101014unsafe { $crate::init::Init::__init(init, slot) }
10111015}
10121016)*
@@ -1121,6 +1125,8 @@ macro_rules! __init_internal {
11211125// no possibility of returning without `unsafe`.
11221126struct __InitOk;
11231127// Get the data about fields from the supplied type.
1128+//
1129+// SAFETY: TODO.
11241130let data = unsafe {
11251131use $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 {
11761182let init = move |slot| -> ::core::result::Result<(), $err> {
11771183 init(slot).map(|__InitOk| ())
11781184};
1185+// SAFETY: TODO.
11791186let 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.
13271336unsafe {
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