Rollup merge of #72551 - alilleybrinker:document-debug-stability, r=KodrAus

First draft documenting Debug stability.

Debug implementations of std types aren't stable, and neither are derived Debug implementations for any types, including user-defined types. This commit adds a section to the Debug documentation noting this stability status.

This issue is tracked by #62794.
This commit is contained in:
Ralf Jung
2020-05-25 11:01:10 +02:00
committed by GitHub
+7
View File
@@ -441,6 +441,13 @@ fn fmt(&self, fmt: &mut Formatter<'_>) -> Result {
/// `enum`s, it will use the name of the variant and, if applicable, `(`, then the
/// `Debug` values of the fields, then `)`.
///
/// # Stability
///
/// Derived `Debug` formats are not stable, and so may change with future Rust
/// versions. Additionally, `Debug` implementations of types provided by the
/// standard library (`libstd`, `libcore`, `liballoc`, etc.) are not stable, and
/// may also change with future Rust versions.
///
/// # Examples
///
/// Deriving an implementation: