You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an integer type can be uniquely determined from the surrounding program context, the unsuffixed integer literal has that type.
If the program context under-constrains the type, it defaults to the signed 32-bit integer i32.
If the program context over-constrains the type, it is considered a static type error.
Whereas this example shows that even though it must be i32 by default, the abs method cannot figure it out. This may also be a part of the method call operator — does it happen anywhere else?
I asked a question on #rust-beginners and it was suggested to make a bug report.
Playground
The text was updated successfully, but these errors were encountered: