Skip to content

Add #[must_use] to to_value conversions #89794

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

jkugelman
Copy link
Contributor

NonNull<T>::cast snuck in when I wasn't looking. What a scamp!

Parent issue: #89692

r? @joshtriplett

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2021
@rust-log-analyzer

This comment has been minimized.

@jkugelman jkugelman force-pushed the must-use-to_value-conversions branch from b142b8f to 0cf84c8 Compare October 11, 2021 23:37
@joshtriplett
Copy link
Member

For the methods that consume self, "without modifying the original" seems misleading. Perhaps something like "consume the value and return a new value, rather than modifying the original in-place"?

@joshtriplett joshtriplett added the relnotes Marks issues that should be documented in the release notes of the next release. label Oct 12, 2021
@jkugelman
Copy link
Contributor Author

The ones that take self are on char and NonNull, which are Copy.

@joshtriplett
Copy link
Member

Fair enough.

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 12, 2021

📌 Commit 0cf84c8 has been approved by joshtriplett

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Oct 13, 2021
…ions, r=joshtriplett

Add #[must_use] to to_value conversions

`NonNull<T>::cast` snuck in when I wasn't looking. What a scamp!

Parent issue: rust-lang#89692

r? ``@joshtriplett``
the8472 added a commit to the8472/rust that referenced this pull request Oct 13, 2021
…ions, r=joshtriplett

Add #[must_use] to to_value conversions

`NonNull<T>::cast` snuck in when I wasn't looking. What a scamp!

Parent issue: rust-lang#89692

r? ```@joshtriplett```
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 13, 2021
Rollup of 12 pull requests

Successful merges:

 - rust-lang#89768 (add some more testcases)
 - rust-lang#89777 (Edit explanation of test for nested type ascriptions)
 - rust-lang#89781 (Add missing words in `Infallible` docs)
 - rust-lang#89782 (Improve CJK font in rustdoc)
 - rust-lang#89794 (Add #[must_use] to to_value conversions)
 - rust-lang#89814 (Fix uppercase/lowercase error)
 - rust-lang#89816 (Fix invalid rules in .gitignore)
 - rust-lang#89817 (Add #[inline] to int log10 functions.)
 - rust-lang#89818 (Use Option::map_or instead of open coding it)
 - rust-lang#89828 (Fix config.toml overflow-checks options)
 - rust-lang#89840 (fix the stage0 tools config file path in `config.toml.example`)
 - rust-lang#89845 (Add davidtwco to the `.mailmap`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c1bde6e into rust-lang:master Oct 13, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 13, 2021
@jkugelman jkugelman deleted the must-use-to_value-conversions branch October 13, 2021 16:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants