|
| 1 | +# Skill tree for const generics features |
| 2 | + |
| 3 | +```skill-tree |
| 4 | +[[group]] |
| 5 | +name = "min_cg" |
| 6 | +label = "MIN CONST GENERICS" |
| 7 | +description = ["Minimum subset of const generics only allowing `const N: {integer} | bool | char` and fully concrete constants"] |
| 8 | +href = "https://github.com/rust-lang/rust/pull/79135" |
| 9 | +items = [] |
| 10 | +
|
| 11 | +[[group]] |
| 12 | +name = "valtree" |
| 13 | +label = "VALTREES" |
| 14 | +description = ["Use valtrees in all type level constants"] |
| 15 | +items = [ |
| 16 | + { label = "Design of structural equality is worked out" }, |
| 17 | + { label = "Valtrees are implemented" }, |
| 18 | +] |
| 19 | +
|
| 20 | +[[group]] |
| 21 | +name = "min_defaults" |
| 22 | +label = "CONCRETE CONST DEFAULTS" |
| 23 | +description = ["Permit concrete defaults on traits/adts"] |
| 24 | +items = [] |
| 25 | +requires = ["min_cg"] |
| 26 | +
|
| 27 | +[[group]] |
| 28 | +name = "generic_defaults" |
| 29 | +label = "GENERIC CONST DEFAULTS" |
| 30 | +description = ["Permit generic defaults on traits/adts"] |
| 31 | +items = [ |
| 32 | + { label = "Disallow usage of forward declared params via param env" }, |
| 33 | + { label = "Decide when a generic default is considered well formed" }, |
| 34 | +] |
| 35 | +requires = ["min_defaults"] |
| 36 | +
|
| 37 | +[[group]] |
| 38 | +name = "param_tys" |
| 39 | +label = "MORE CONST PARAM TYPES" |
| 40 | +description = ["Permit more types to be as the type of a const generic"] |
| 41 | +items = [ |
| 42 | + { label = "A `Constable` that that signifies a type is valid to use as a const param type" }, |
| 43 | + { label = "Generic const param types i.e. `T: Constable, const N: T`" }, |
| 44 | + { label = "Consider `impl<const N: usize> Trait<{ Some(N) }> for ()` to constrain `N`" }, |
| 45 | +] |
| 46 | +requires = ["valtree", "min_cg"] |
| 47 | +
|
| 48 | +[[group]] |
| 49 | +name = "exhaustiveness" |
| 50 | +label = "IMPL EXHAUSTIVENESS" |
| 51 | +description = ["Allow separate impls to be used to fulfill `for<const N: usize> (): Trait<N>`"] |
| 52 | +items = [] |
| 53 | +requires = ["param_tys"] |
| 54 | +
|
| 55 | +[[group]] |
| 56 | +name = "min_generic_consts" |
| 57 | +label = "MIN GENERIC CONSTANTS" |
| 58 | +description = ["Allow type level constants to be generic i.e. `N + 1`"] |
| 59 | +items = [ |
| 60 | + { label = "Add a where clause that requires a given expression to be evaluatable e.g. `where evaluatable { N - 1 }`" }, |
| 61 | + { label = "Unused substs make it hard to tell if a const is concrete or generic and breaks unsize coercion in some cases" }, |
| 62 | + { label = "Don't eagerly error when evaluating constants during selection" }, |
| 63 | +] |
| 64 | +requires = ["min_cg"] |
| 65 | +
|
| 66 | +[[group]] |
| 67 | +name = "generic_consts" |
| 68 | +label = "GENERIC CONSTANTS" |
| 69 | +description = ["Allow type level constants but better ✨"] |
| 70 | +items = [ |
| 71 | + { label = "Allow writing a where clause that requires a condition to hold e.g. `where { N > 2 }`" }, |
| 72 | + { label = "Some things can always evaluate and should not need a where clause e.g. `{ N == M }` `{ N / 1 }`" }, |
| 73 | + { label = "If possible `where { N > 0 }` should imply `N - 1` is evaluatable" }, |
| 74 | +] |
| 75 | +requires = ["min_generic_consts"] |
| 76 | +
|
| 77 | +[[group]] |
| 78 | +name = "assoc_const_bounds" |
| 79 | +label = "ASSOCIATED CONST BOUNDS" |
| 80 | +description = ["Permit where `where T: Trait<ASSOC = 10>`"] |
| 81 | +items = [] |
| 82 | +requires = ["min_generic_consts"] |
| 83 | +
|
| 84 | +[[group]] |
| 85 | +name = "arg_infer" |
| 86 | +label = "GENERIC ARG CONST INFER" |
| 87 | +description = ["Permit using `_` for generic args"] |
| 88 | +href = "https://github.com/rust-lang/rust/pull/83484" |
| 89 | +items = [] |
| 90 | +requires = ["min_cg"] |
| 91 | +``` |
0 commit comments