[Pre-RFC] Implicit number type widening

I found a very old thread that seems relevant:

I also posted about potentially making foo[x.try_into()] just work in Idea: SliceIndex by Options and/or Results

Conceptually that seems plausible (though felix has a good concern about it), but I don't know how it would feel in practice. Would people be surprised that it doesn't work in other places, like function calls?

Maybe one thing that would help here would be if someone did a survey (in the looking and cataloguing sense, not in the ask people questions sense) of the places that .into() gets used between integers, with particular attention on figuring out where it's a complex case and where it's a trivial one, to see if there's a nice syntactic rule that could be used.

(It reminds me of lifetime elision, which came from "gee, it seems like this particular pattern is something like 80% of the uses of this, so maybe it can just be automatic in those". That "it doesn't need to get everything" criteria seems like the right thing here too, since if a solution here still means adding u64::from sometimes I'd be totally good with that if it makes the rules simpler and clearer.)

I don't know if there's an issue for it; it's come up in a few RFCs recently: