Skip to content

rustc_span: mark few methods as must_use #145159

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

Closed
wants to merge 1 commit into from

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Aug 9, 2025

Marked methods sometimes use returned value, sometimes not. I'm not sure that this is incorrect, so currently silenced warnings.

@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 9, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems okay to me, but I'd like @petrochenkov to double-check in case one of the ignores actually shouldn't have been

@jieyouxu
Copy link
Member

jieyouxu commented Aug 9, 2025

r? @petrochenkov

@rustbot rustbot assigned petrochenkov and unassigned jieyouxu Aug 9, 2025
@petrochenkov
Copy link
Contributor

I don't think must_use makes sense on any of those.
They are typical &mut self methods that are used for mutation, but can also return something useful in the process.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 11, 2025
@klensy klensy deleted the span_mustuse branch August 11, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants