File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,21 +70,18 @@ pub trait FnPtr:
7070 /// Constructs an instance from an address.
7171 ///
7272 /// # Safety
73- /// This function is unsafe because it can not check if the argument points to a function
74- /// of the correct type.
73+ /// The given pointer has to point to a function of the correct type.
7574 #[ must_use]
7675 unsafe fn from_addr( addr: usize ) -> Self {
7776 unsafe { Self :: from_ptr( addr as UntypedFnPtr ) }
7877 }
79-
8078 /// Returns a untyped function pointer for this function.
8179 #[ must_use]
8280 fn as_ptr( & self ) -> UntypedFnPtr ;
8381 /// Constructs an instance from an untyped function pointer.
8482 ///
8583 /// # Safety
86- /// This function is unsafe because it can not check if the argument points to a function
87- /// of the correct type.
84+ /// The given pointer has to point to a function of the correct type.
8885 #[ must_use]
8986 #[ allow( clippy:: missing_safety_doc) ] // false positive?
9087 unsafe fn from_ptr( ptr: UntypedFnPtr ) -> Self ;
You can’t perform that action at this time.
0 commit comments