From 001314176513e08753626a8116b14d1c9ca6d111 Mon Sep 17 00:00:00 2001 From: TmSalviano Date: Mon, 3 Mar 2025 22:13:33 -0300 Subject: [PATCH 1/2] fix: no equivalence between never type and zero-variant enum. --- src/items/enumerations.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items/enumerations.md b/src/items/enumerations.md index d9d16bf0a7..17e3ab0613 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -320,8 +320,8 @@ enum ZeroVariants {} ``` r[items.enum.empty.uninhabited] -Zero-variant enums are equivalent to the [never type], but they cannot be -coerced into other types. +Only the [never type] can be coerced into zero-variant enums. Conversely, +zero-variant enums cannot be coerced into any other type. ```rust,compile_fail # enum ZeroVariants {} From 41db4aa8bf4f56ed4b88f43dc234dc3895f28746 Mon Sep 17 00:00:00 2001 From: TmSalviano Date: Mon, 3 Mar 2025 22:43:12 -0300 Subject: [PATCH 2/2] Fix: line ended with space (sorry for the rookie mistake) --- src/items/enumerations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/items/enumerations.md b/src/items/enumerations.md index 17e3ab0613..be207f2f9f 100644 --- a/src/items/enumerations.md +++ b/src/items/enumerations.md @@ -320,7 +320,7 @@ enum ZeroVariants {} ``` r[items.enum.empty.uninhabited] -Only the [never type] can be coerced into zero-variant enums. Conversely, +Only the [never type] can be coerced into zero-variant enums. Conversely, zero-variant enums cannot be coerced into any other type. ```rust,compile_fail