This will never be allowed without some fancy new features no one has come up with yet. If X is a constant, then it would already work on nightly though
-
-
-
Think of it like `variable::ASSOCIATED_CONST` not being a thing either, but worse, because len is a runtime function.
End of conversation
New conversation -
-
-
Why this is not already allowed? Isn't x immutable slice with 4 elements? So the x. len() should be const ! IMO the len method should be considered const iff the size is known at compile time.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Yes I think it's const generics
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.