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

[significant_drop_tightening] Ignore inexpensive statements #10363

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

c410-f3r
Copy link
Contributor

@c410-f3r c410-f3r commented Feb 16, 2023

Not all statements that follow the last use of a lock guard are expensive and can therefore be ignored by the lint.

pub fn foo() -> i32 {
    let mutex = Mutex::new(1);
    let lock = mutex.lock().unwrap();
    let rslt = *lock;
    let another = rslt;
   another
}

changelog: [significant_drop_tightening]: No longer lints for inexpensive statements after the lock guard
#10363

@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2023

r? @xFrednet

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 16, 2023
@xFrednet
Copy link
Member

Looks good to me, thank you!

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 18, 2023

📌 Commit 747f81e has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Feb 18, 2023

⌛ Testing commit 747f81e with merge e1da002...

@bors
Copy link
Collaborator

bors commented Feb 18, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing e1da002 to master...

@bors bors merged commit e1da002 into rust-lang:master Feb 18, 2023
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.

4 participants