We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4249fb4 + 4675c25 commit 5ee8ee1Copy full SHA for 5ee8ee1
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,6 +600,9 @@ assert_eq!(Enum::B as i32, 1);
599
600
assert_eq!(Enum::C as i32, 2);
601
```
602
603
+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
608
0 commit comments