Skip to content

Commit c380963

Browse files
committed
Add a sentence about not using Show output for reconstruction
1 parent 48f778e commit c380963

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

text/0000-show-stabilization.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ instead move to the `{:?}` specifier instead of the `{}` specifier (which
115115
An implementation of the `Show` trait is expected for **all** types in Rust and
116116
provides very few guarantees about the output. Output will typically represent
117117
the internal state as faithfully as possible, but it is not expected that this
118-
will always be true.
118+
will always be true. The output of `Show` should never be used to reconstruct
119+
the object itself as it is not guaranteed to be possible to do so.
119120

120121
The purpose of the `Show` trait is to facilitate debugging Rust code which
121122
implies that it needs to be maximally useful by extending to all Rust types. All

0 commit comments

Comments
 (0)