RFC 1030: prelude-additions

libs (traits | prelude)

Summary

Add Default, IntoIterator and ToOwned trait to the prelude.

Motivation

Each trait has a distinct motivation:

Detailed design

Drawbacks

The main downside is that prelude entries eat up some amount of namespace (particularly, method namespace). However, these are all important, core traits in std, meaning that the method names are already quite unlikely to be used.

Strictly speaking, a prelude addition is a breaking change, but as above, this is highly unlikely to cause actual breakage. In any case, it can be landed prior to 1.0.

Alternatives

None.

Unresolved questions

The exact timeline of deprecation for IntoIter types.

Are there other traits or types that should be promoted before 1.0?