You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use ref_cast::{ref_cast_custom,RefCastCustom};#[derive(RefCastCustom)]#[repr(transparent)]pubstructRepro(u8);implRepro{#[ref_cast_custom]pubunsafefnunchecked_ref_cast_mut(x:&mutu8) -> &mutSelf;}
warning: unnecessary `unsafe` block --> src/main.rs:9:66 |9 | pub unsafe fn unchecked_ref_cast_mut(x: &mut u8) -> &mut Self; | -------------------------------------------------------------^ unnecessary `unsafe` block | | | because it's nested under this `unsafe` fn | = note: `#[warn(unused_unsafe)]` on by default = note: this `unsafe` block does contain unsafe operations, but those are already allowed in an `unsafe fn` = note: `#[allow(unsafe_op_in_unsafe_fn)]` on by default
The warning does not appear anymore on 1.65 (current beta) and up, but we might as well stick an allow(unused_unsafe) into the generated code.
The text was updated successfully, but these errors were encountered:
The warning does not appear anymore on 1.65 (current beta) and up, but we might as well stick an
allow(unused_unsafe)
into the generated code.The text was updated successfully, but these errors were encountered: