External Publication
Visit Post

Pre-RFC: Function parameter defaults

Rust Internals [Unofficial] February 25, 2026
Source
jplatte: > ### Adding a default to an existing parameter outside a trait > > … is a minor change because it can break type inference. > > ### Adding a new parameter with a default outside a trait > > … is also a minor change because it can break type inference. Can you give me an example? Because it seems to me that it instead allows the fn to accept more inferences. (Is that what you mean by "break type inference" or did you mean something else?)

Discussion in the ATmosphere

Loading comments...