File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ A _const fn_ is a function that one is permitted to call from a const context. D
63
63
` const ` has no effect on any existing uses, it only restricts the types that arguments and the
64
64
return type may use, as well as prevent various expressions from being used within it.
65
65
66
+ Notable features that const contexts have, but const fn haven't are:
67
+
68
+ * floating point types
69
+ * ` dyn Trait ` types
70
+ * generic bounds on generic parameters beyond ` Sized `
71
+ * dereferencing of raw pointers
72
+ * casting raw pointers to integers
73
+ * comparing raw pointers
74
+ * union field access
75
+
66
76
[ arithmetic ] : expressions/operator-expr.md#arithmetic-and-logical-binary-operators
67
77
[ array expressions ] : expressions/array-expr.md
68
78
[ array indexing ] : expressions/array-expr.md#array-and-slice-indexing-expressions
You can’t perform that action at this time.
0 commit comments