Skip to content

Commit c44f833

Browse files
committed
Say that Error::description is deprecated and should not be implemented
1 parent 86cbdfc commit c44f833

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: src/interoperability.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ impl Error for DoError { /* ... */ }
269269
The error message given by the `Display` representation of an error type should
270270
be lowercase without trailing punctuation, and typically concise.
271271

272-
The message given by [`Error::description()`] does not matter. Users should
273-
always use `Display` instead of `description()` to print the error. A low-effort
274-
description like `"JSON error"` is sufficient.
272+
[`Error::description()`] should not be implemented. It has been deprecated and users should
273+
always use `Display` instead of `description()` to print the error.
275274

276275
[`Error::description()`]: https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.description
277276

0 commit comments

Comments
 (0)