File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1749,7 +1749,9 @@ pub const unsafe fn write_unaligned<T>(dst: *mut T, src: T) {
17491749///
17501750/// Volatile operations are intended to act on I/O memory, and are guaranteed
17511751/// to not be elided or reordered by the compiler across other volatile
1752- /// operations.
1752+ /// operations. In addition, note that bit-address 0 is legal and can be used
1753+ /// when it's known to hold I/O memory, so using these operations on a null
1754+ /// pointer won't panic.
17531755///
17541756/// # Notes
17551757///
@@ -1828,7 +1830,9 @@ pub unsafe fn read_volatile<T>(src: *const T) -> T {
18281830///
18291831/// Volatile operations are intended to act on I/O memory, and are guaranteed
18301832/// to not be elided or reordered by the compiler across other volatile
1831- /// operations.
1833+ /// operations. In addition, note that bit-address 0 is legal and can be used
1834+ /// when it's known to hold I/O memory, so using these operations on a null
1835+ /// pointer won't panic.
18321836///
18331837/// `write_volatile` does not drop the contents of `dst`. This is safe, but it
18341838/// could leak allocations or resources, so care should be taken not to overwrite
You can’t perform that action at this time.
0 commit comments