3 ms·
I believe in order to be dependent, a value needs to be able to affect the type somehow. So something like: fn make_array(n: usize) -> [u8; n] would do th
by habitue 6y ago
I believe in order to be dependent, a value needs to be able to affect the type somehow. So something like:
fn make_array(n: usize) -> [u8; n]
would do the trick.
I am guessing this isn't actually the feature though, and that it's not allowing dependence in this way, but rather promoting some const values and const functions to the type level (which is really useful, but not exactly dependent types)
- fluffything 6y agoThats the 3rd RFC in the trilogy. What has been shipped is a subset of the first RFC.