Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a Default trait for an empty format string #8564

Closed
wants to merge 2 commits into from

Conversation

alexcrichton
Copy link
Member

See discussion in #8489, but this selects option 3 by adding a Default trait to be implemented by various basic types.

Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of fmt! to move towards ifmt!. The goal is to replace %X with {} in 90% of situations, and this commit should enable that.

By using a separate trait this is overridable on a per-type basis and makes room
for the possibility of even more arguments passed in for the future.
bors added a commit that referenced this pull request Aug 19, 2013
See discussion in #8489, but this selects option 3 by adding a `Default` trait to be implemented by various basic types.

Once this makes it into a snapshot I think it's about time to start overhauling all current use-cases of `fmt!` to move towards `ifmt!`. The goal is to replace `%X` with `{}` in 90% of situations, and this commit should enable that.
@bors bors closed this Aug 19, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jun 4, 2022
…endoo

Don't lint `useless_transmute` on types with erased regions

fixes rust-lang#6356
fixes rust-lang#3340
fixes rust-lang#2906

This should get a proper fix at some point, but this at least gets the lint running on some types.

cc rust-lang#5343

changelog: Don't lint `useless_transmute` on types with erased regions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants