I've submitted an RFC for this one:
https://github.com/rust-lang/rfcs/pull/29


On Sat, Mar 29, 2014 at 6:14 PM, Bill Myers <bill_my...@outlook.com> wrote:

> I think the best solution is to add uN and sN types where N is not a power
> of two, which LLVM should already support.
>
> Then you can write your match like this:
> match (val >> 6) as u2
> {
>   ...
> }
>
> And it will work as desired.
>
> Biggest issue is that to make it work nicely you'd need to add some way to
> generalize over the bit-length and integers, and that's going to require
> generics with int parameters and work to add those.
>
>


-- 
Sincerely,
Vladimir "Farcaller" Pouzanov
http://farcaller.net/
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to