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

Add question-mark-used lint #10342

Merged
merged 2 commits into from
Feb 16, 2023
Merged

Conversation

mitsuhiko
Copy link
Contributor

@mitsuhiko mitsuhiko commented Feb 13, 2023

This lint complains when the question mark operator (try operator) is used. This is a restriction lint that can be useful on local scopes where a custom error handling macro is supposed to be used to augment the error based on local scope data before returning.

Fixes #10340


changelog: New lint [question_mark_used]
#10342

@rustbot
Copy link
Collaborator

rustbot commented Feb 13, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Alexendoo (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 13, 2023
This lint complains when the question mark operator (try operator)
is used.  This is a restriction lint that can be useful on local
scopes where a custom error handling macro is supposed to be used
to augment the error based on local scope data before returning.
@Alexendoo
Copy link
Member

Thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

📌 Commit 0933798 has been approved by Alexendoo

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

⌛ Testing commit 0933798 with merge 52c8b53...

@bors
Copy link
Collaborator

bors commented Feb 16, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 52c8b53 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Feb 16, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Alexendoo
Pushing 52c8b53 to master...

@bors bors merged commit 52c8b53 into rust-lang:master Feb 16, 2023
@mitsuhiko mitsuhiko deleted the feature/question-mark-used branch February 17, 2023 09:34
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deny Question Mark / Try Operator Lint
5 participants