File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -971,9 +971,14 @@ pub trait UpperHex {
971
971
/// `p` formatting.
972
972
///
973
973
/// The `Pointer` trait should format its output as a memory location. This is commonly presented
974
- /// as hexadecimal.
974
+ /// as hexadecimal. For more information on formatters, see [the module-level documentation][module].
975
975
///
976
- /// For more information on formatters, see [the module-level documentation][module].
976
+ /// Printing of pointers is not a reliable way to discover how Rust programs are implemented,
977
+ /// because the act of reading an address of a value may change how the value is stored in memory,
978
+ /// and prevent some code optimizations.
979
+ ///
980
+ /// Rust may move values in memory, and reuse the same memory locations for different values, so
981
+ /// the printed pointer values are not guaranteed to be stable nor unique identifiers of objects.
977
982
///
978
983
/// [module]: ../../std/fmt/index.html
979
984
///
You can’t perform that action at this time.
0 commit comments