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

Experiment: Add #[may_ignore] and use that for String::write_fmt. #78822

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Nov 6, 2020

Trying out some idea to improve write!(string, ..).

r? @ghost

@m-ou-se m-ou-se added A-fmt Area: std::fmt S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. labels Nov 6, 2020
@m-ou-se m-ou-se marked this pull request as draft November 6, 2020 23:23
@m-ou-se m-ou-se force-pushed the string-write-fmt-may-ignore branch 6 times, most recently from 037a136 to 5546637 Compare November 7, 2020 00:02
@m-ou-se m-ou-se mentioned this pull request Nov 7, 2020
@bors
Copy link
Contributor

bors commented Nov 9, 2020

☔ The latest upstream changes (presumably #78889) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 9, 2020
@jyn514
Copy link
Member

jyn514 commented Apr 16, 2021

@m-ou-se do you still plan to work on this?

@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 16, 2021

I no longer thing String::write_fmt should ignore errors, since Display implementations can still return an Err (even though they probably shouldn't). So panicking would be better than ignoring. (Althought that will probably not be optimized away even when just formatting things that can never fail. :( )

@m-ou-se m-ou-se closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fmt Area: std::fmt S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants