We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 667ffe8 commit 80322dfCopy full SHA for 80322df
src/references.rs
@@ -1,11 +1,11 @@
1
//! Reimplementations of [`std::ptr::null()`] and [`std::ptr::null_mut()`], with safe code only.
2
//! Relies on [`crate::transmute`] under the hood.
3
4
-/// Equivalent to [`std::ptr::null()`], but returns an null reference instead.
+/// Equivalent to [`std::ptr::null()`], but returns a null reference instead.
5
pub fn null<'a, T: 'static>() -> &'a T {
6
crate::transmute(0usize)
7
}
8
-/// Equivalent to [`std::ptr::null_mut()`], but returns an mutable null reference instead.
+/// Equivalent to [`std::ptr::null_mut()`], but returns a mutable null reference instead.
9
pub fn null_mut<'a, T: 'static>() -> &'a mut T {
10
11
0 commit comments