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

Make ControlFlow #[must_use] #78202

Closed

Conversation

LeSeulArtichaut
Copy link
Contributor

Suggested by @oli-obk in #78182 (comment).
r? @scottmcm cc #75744

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 21, 2020
@LeSeulArtichaut LeSeulArtichaut added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 21, 2020
@scottmcm
Copy link
Member

Hmm, I don't have a good sense for how to decide whether to do this. It makes total sense in the visitor recursion scenario, but seems suboptimal in the updated doctest's scenario of try_for_each with a closure that mutates locals. (And we saw in the fold_mut conversation (#76746) that using for_each with a mutable closure can be better than rewriting it to fold.)

Maybe @rust-lang/libs would have some advice? Sadly there's nothing I could find in the api-guidelines about #[must_use].

cc @NoraCodes and @ecstatic-morse, as other participants in the tracking issue, to comment on whether this makes sense in their situations.

@m-ou-se
Copy link
Member

m-ou-se commented Oct 22, 2020

There's some discussion on #[must_use] in std here: #48926

@bors
Copy link
Contributor

bors commented Oct 25, 2020

☔ The latest upstream changes (presumably #78334) 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants