Skip to content

Commit 9cb14a6

Browse files
authored
Update lib.rs to add doc about errors in public function
1 parent cf6dab3 commit 9cb14a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ mod validation;
3232
/// Get a heap-allocated raw pointer without ownership.
3333
///
3434
/// To back to manage the memory with ownership use [`own_back<T>()`].
35+
///
36+
/// # Errors
37+
///
38+
/// If the allocator reports a failure, then an error is returned.
3539
#[cfg(any(feature = "alloc", feature = "std"))]
3640
#[inline]
3741
pub fn raw<T>(data: T) -> Result<*mut T, PointerError> {

0 commit comments

Comments
 (0)