File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -971,9 +971,14 @@ pub trait UpperHex {
971971/// `p` formatting.
972972///
973973/// 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].
975975///
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.
977982///
978983/// [module]: ../../std/fmt/index.html
979984///
You can’t perform that action at this time.
0 commit comments