diff --git a/src/types/any.rs b/src/types/any.rs index 29babac8..2e8a518f 100644 --- a/src/types/any.rs +++ b/src/types/any.rs @@ -1617,6 +1617,10 @@ pub trait PyAnyMethods<'py> { unsafe fn downcast_unchecked(&self) -> &Bound<'py, T>; /// Like `downcast_unchecked` but takes ownership of `self`. + /// + /// # Safety + /// + /// Callers must ensure that the type is valid or risk type confusion. unsafe fn downcast_into_unchecked(self) -> Bound<'py, T>; /// Extracts some type from the Python object.