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
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
map and chain_ref take the option by reference, and map_consume and chain take the option by value and unwrap it inside. We should decide whether we prefer the -consume or the -ref suffix, and standardize the stdlib to it. (I bet Either has the same problems.)
My vote is for the shorter name being consuming, and having a -ref suffix.
Nominating backwards-compatibility milestone. While not about language syntax, these functions are pervasive enough that renaming them after 1.0 would be a big hassle.
The text was updated successfully, but these errors were encountered:
…steffen
new lint: `recursive_format_impl`
The to_string_in_display lint is renamed to recursive_format_impl
A check is added for the use of self formatted with Display or Debug inside any format string in the same impl
The to_string_in_display check is kept as is - like in the format_in_format_args lint
This is my first contribution so please check it for better / more idiomatic checks + error messages. Note the format macro paths are shared with the `format_in_format_args` lint - maybe those could be moved to clippy utils too.
This relates to issues rust-lang#2691 and rust-lang#7830
------
changelog: Renamed `to_string_in_display` lint to [`recursive_format_impl`] with new check for any use of self as Display or Debug inside the same format trait impl.
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
map
andchain_ref
take the option by reference, andmap_consume
andchain
take the option by value and unwrap it inside. We should decide whether we prefer the -consume or the -ref suffix, and standardize the stdlib to it. (I betEither
has the same problems.)My vote is for the shorter name being consuming, and having a -ref suffix.
Nominating backwards-compatibility milestone. While not about language syntax, these functions are pervasive enough that renaming them after 1.0 would be a big hassle.
The text was updated successfully, but these errors were encountered: