Can we allow integer literals like 1 to be inferred to floating point type?


In rust today, an integer like 1 cannot be inferred to floating point type. This means that valid-looking numeric expressions like 22.5 + 1 will not compile, and one must instead write 22.5 + 1.0. Can/should we change this?


This was discussed on Zulip in May 2020. Some of the key highlights from the discussion were: