Skip to content

Conversation

WaffleLapkin
Copy link
Member

Fixes #109271
r? @compiler-errors

This should probably be refined a bit, but opening a PR so that I don't forget anything.

@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 Apr 7, 2023
@WaffleLapkin WaffleLapkin added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2023
@rust-log-analyzer

This comment has been minimized.

@WaffleLapkin WaffleLapkin added A-diagnostics Area: Messages for errors, warnings, and lints A-closures Area: Closures (`|…| { … }`) A-borrow-checker Area: The borrow checker labels Apr 7, 2023
@WaffleLapkin
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 12, 2023
@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from ea6fc6c to 0c8ebc9 Compare April 12, 2023 17:35
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 16, 2023

☔ The latest upstream changes (presumably #110405) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from 385d50c to e1b56cb Compare April 17, 2023 14:21
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from d814747 to 8c4596d Compare April 17, 2023 16:54
@bors
Copy link
Collaborator

bors commented Apr 17, 2023

☔ The latest upstream changes (presumably #110458) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

r? @cjgillot

@rustbot rustbot assigned cjgillot and unassigned compiler-errors Apr 19, 2023
@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from 8c4596d to b47cd78 Compare April 19, 2023 11:04
@cjgillot
Copy link
Contributor

r=me with review commits squashed into main commits

@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from b47cd78 to 4daa932 Compare April 19, 2023 19:05
@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from 4daa932 to 5d41a46 Compare April 19, 2023 19:07
While it might *seem* that this does something, it actually doesn't.
`mut_borrow_of_mutable_ref` returns a `bool` that is ignored by the
let-else. This was basically
```rust
if !self.body.local_decls.get(local).is_some() {
    return
}
```
Which is pretty useless
We use caller information to track where a diagnostic was created,
so all "helper" diagnostic functions should use `#[track_caller]`
@rust-cloud-vms rust-cloud-vms bot force-pushed the duality_of_myself_and_this branch from 5d41a46 to cac143f Compare April 19, 2023 19:21
@WaffleLapkin
Copy link
Member Author

@bors r=cjgillot

I've cleaned-up the git history

@bors
Copy link
Collaborator

bors commented Apr 19, 2023

📌 Commit cac143f has been approved by cjgillot

It is now in the queue for this repository.

@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 Apr 19, 2023
@bors
Copy link
Collaborator

bors commented Apr 19, 2023

⌛ Testing commit cac143f with merge b9fd498...

@bors
Copy link
Collaborator

bors commented Apr 20, 2023

☀️ Test successful - checks-actions
Approved by: cjgillot
Pushing b9fd498 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 20, 2023
@bors bors merged commit b9fd498 into rust-lang:master Apr 20, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 20, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b9fd498): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.8% [3.8%, 3.8%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.5% [-3.5%, -3.5%] 1
All ❌✅ (primary) 3.8% [3.8%, 3.8%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.2% [2.0%, 2.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker A-closures Area: Closures (`|…| { … }`) A-diagnostics Area: Messages for errors, warnings, and lints merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

Detect unused "passing self into closure" pattern to side-step borrow checker
7 participants