How hard would be to have this compiling correctly?
@Luca Barbato not easy. as the msg awkwardly indicates, slicing is a function call. it's calling a method on a trait, to be precise.
I know about Index :)
so fixing this requires finding a solution for "which trait methods can const code call"
and that's a tough question because you have to make sure that the trait method was implemented with const code only
see https://github.com/rust-rfcs/const-eval/pull/8 for the current discussion about that
I guess I should rethink that part for the time being :)