We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b37679 commit 350536cCopy full SHA for 350536c
src/expressions/operator-expr.md
@@ -586,6 +586,7 @@ halfway between two floating point numbers.
586
r[expr.as.enum]
587
#### Enum cast
588
589
+r[expr.as.enum.discriminant]
590
Casts an enum to its discriminant, then uses a numeric cast if needed.
591
Casting is limited to the following kinds of enumerations:
592
@@ -599,8 +600,8 @@ assert_eq!(Enum::B as i32, 1);
599
600
assert_eq!(Enum::C as i32, 2);
601
```
602
-> [!WARNING]
603
-> By default [enum casts are not allowed for enums which implement `Drop`][cenum_impl_drop_cast].
+r[expr.as.enum.no-drop]
604
+Casting is not allowed if the enum implements [`Drop`].
605
606
r[expr.as.bool-char-as-int]
607
#### Primitive to integer cast
0 commit comments