@@ -1139,14 +1139,7 @@ pub const unsafe fn init_from_closure<T: ?Sized, E>(
11391139pub const unsafe fn cast_pin_init < T , U , E > ( init : impl PinInit < T , E > ) -> impl PinInit < U , E > {
11401140 // SAFETY: initialization delegated to a valid initializer. Cast is valid by function safety
11411141 // requirements.
1142- let res = unsafe { pin_init_from_closure ( |ptr : * mut U | init. __pinned_init ( ptr. cast :: < T > ( ) ) ) } ;
1143- // FIXME: this let binding is required to avoid a compiler error (cycle when computing the opaque
1144- // type returned by this function) before Rust 1.81. Remove after MSRV bump.
1145- #[ allow(
1146- clippy:: let_and_return,
1147- reason = "some clippy versions warn about the let binding"
1148- ) ]
1149- res
1142+ unsafe { pin_init_from_closure ( |ptr : * mut U | init. __pinned_init ( ptr. cast :: < T > ( ) ) ) }
11501143}
11511144
11521145/// Changes the to be initialized type.
@@ -1158,14 +1151,7 @@ pub const unsafe fn cast_pin_init<T, U, E>(init: impl PinInit<T, E>) -> impl Pin
11581151pub const unsafe fn cast_init < T , U , E > ( init : impl Init < T , E > ) -> impl Init < U , E > {
11591152 // SAFETY: initialization delegated to a valid initializer. Cast is valid by function safety
11601153 // requirements.
1161- let res = unsafe { init_from_closure ( |ptr : * mut U | init. __init ( ptr. cast :: < T > ( ) ) ) } ;
1162- // FIXME: this let binding is required to avoid a compiler error (cycle when computing the opaque
1163- // type returned by this function) before Rust 1.81. Remove after MSRV bump.
1164- #[ allow(
1165- clippy:: let_and_return,
1166- reason = "some clippy versions warn about the let binding"
1167- ) ]
1168- res
1154+ unsafe { init_from_closure ( |ptr : * mut U | init. __init ( ptr. cast :: < T > ( ) ) ) }
11691155}
11701156
11711157/// An initializer that leaves the memory uninitialized.
0 commit comments