Skip to content

Commit fe6ddd5

Browse files
committed
Specify behavior when passed a null pointer
1 parent ead1159 commit fe6ddd5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/liballoc/boxed.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@
7373
//!
7474
//! ```c
7575
//! /* C header */
76-
//! struct Foo* foo_new(void); /* Returns ownership to the caller */
77-
//! void foo_delete(struct Foo*); /* Takes ownership from the caller */
76+
//!
77+
//! /* Returns ownership to the caller */
78+
//! struct Foo* foo_new(void);
79+
//!
80+
//! /* Takes ownership from the caller; no-op when invoked with NULL */
81+
//! void foo_delete(struct Foo*);
7882
//! ```
7983
//!
8084
//! These two functions might be implemented in Rust as follows. Here, the

0 commit comments

Comments
 (0)