Jacob Lifshay
Jacob Lifshay
> * What are examples of non-integer types that _should not_ implement this trait (because they don't have any operation that is a wrapping conversion in this sense)? that part's...
an idea for `{int}: WrappingFrom`: that's how you spell [JavaScript-style float -> int conversions](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-touint32) which are basically: ```rust if input.is_finite() { // can be done without actually needing an intermediate...
> `{int}: WrappingFrom` would be confusing and not very useful. > > * The method name `wrapping_from` doesn't fit since it doesn't just wrap, but also rounds towards zero, and...
> but the output `u16` has the property that adding `u16::MAX` is a noop. I think you mean adding `0x10000` since `u16::MAX == 0xFFFF` and adding that isn't a noop...
> My understanding is that `WrappingFrom for U` is implemented for the primitive integral types where `sizeof >= sizeof` afaict `WrappingFrom for U` is implemented for all combinations of integer...
related: promoting `*-gnullvm` to tier 2 with host tools https://github.com/rust-lang/compiler-team/issues/877
one more effect/color came up: [`strictfp` (or whatever you want to call it)](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/adding.20target.20option.20for.20floating.20point.20semantics/near/476174608) -- it is an opt-in allowing code to run with non-default fp environment.
> Separately, the bike emoji is cute to put in the RFC, but it doesn't render very well all the time. On my particular device, it's a small gray bike...
I do think inferred types are useful when matching for brevity's sake: e.g. in a RV32I emulator: ```rust #[derive(Copy, Clone, Default, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)] pub struct Reg(pub...
> I'm not sure what's gained by doing this instead of adding a single `use Insn::*;` statement before the match, or a `use self::Insn::*` statement across the board and just...