File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -180,9 +180,13 @@ restriction).
180
180
### static => static
181
181
182
182
It is illegal for a ` static ` to reference another ` static ` by value. It is
183
- required that all references be borrowed. If this were not required, then this
184
- sort of reference would require that the static being referenced fall into one
185
- of two categories:
183
+ required that all references be borrowed. Additionally, not all kinds of borrows
184
+ are allowed, only explicitly taking the address of another static is allowed.
185
+ For example, interior borrows of fields and elements or accessing elements of an
186
+ array are both disallowed.
187
+
188
+ If a by-value reference were allowed, then this sort of reference would require
189
+ that the static being referenced fall into one of two categories:
186
190
187
191
1 . It's an initializer pattern. This is the purpose of ` const ` , however.
188
192
2 . The values are kept in sync. This is currently technically infeasible.
You can’t perform that action at this time.
0 commit comments