Loading design/src/rfcs/rfc0022_error_context_and_compatibility.md +2 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,8 @@ Actionable errors are represented as enums. If an error variant has an error sou information, it must use a separate context struct that is referenced via tuple in the enum. For example: ```rust // Good: new error types can be added in the future #[non_exhaustive] pub enum Error { // Good: This is exhaustive and uses a tuple, but its sole member is an extensible struct with private fields VariantA(VariantA), Loading Loading
design/src/rfcs/rfc0022_error_context_and_compatibility.md +2 −0 Original line number Diff line number Diff line Loading @@ -233,6 +233,8 @@ Actionable errors are represented as enums. If an error variant has an error sou information, it must use a separate context struct that is referenced via tuple in the enum. For example: ```rust // Good: new error types can be added in the future #[non_exhaustive] pub enum Error { // Good: This is exhaustive and uses a tuple, but its sole member is an extensible struct with private fields VariantA(VariantA), Loading