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

Adjust UI tests for unit_bindings lint #112549

Merged
merged 1 commit into from Jun 13, 2023

Conversation

jieyouxu
Copy link
Contributor

@jieyouxu jieyouxu commented Jun 12, 2023

  • Explicitly annotate let x: () = expr; where x has unit type, or remove the unit binding to leave only expr; instead.
  • Use let () = init; or let pat = (); where appropriate.
  • Fix disjoint-capture-in-same-closure test which wasn't actually testing a closure: tests/ui/closures/2229_closure_analysis/run_pass/disjoint-capture-in-same-closure.rs.

Note that unfortunately there's a lot of UI tests, there are a couple of places where I may have left something like let (): () (this is not needed but is left over from an ealier version of the lint) which is bad style.

This PR is to help with the unit_bindings lint at #112380.

@rustbot
Copy link
Collaborator

rustbot commented Jun 12, 2023

r? @compiler-errors

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

@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 Jun 12, 2023
@jieyouxu jieyouxu force-pushed the fix-tests-for-unit-bindings branch from e5e79b0 to beff1c2 Compare June 12, 2023 11:36
@jieyouxu jieyouxu force-pushed the fix-tests-for-unit-bindings branch 3 times, most recently from 91d7c03 to 8f0d6b1 Compare June 12, 2023 12:05
@rust-log-analyzer

This comment has been minimized.

- Either explicitly annotate `let x: () = expr;` where `x` has unit
  type, or remove the unit binding to leave only `expr;` instead.
- Fix disjoint-capture-in-same-closure test
@jieyouxu jieyouxu force-pushed the fix-tests-for-unit-bindings branch from 8f0d6b1 to edafbaf Compare June 12, 2023 12:24
@Nilstrieb
Copy link
Member

r? Nilstrieb
@bors r+
changes look fine to me

@bors
Copy link
Contributor

bors commented Jun 13, 2023

📌 Commit edafbaf has been approved by Nilstrieb

It is now in the queue for this repository.

@rustbot rustbot assigned Nilstrieb and unassigned compiler-errors Jun 13, 2023
@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 Jun 13, 2023
@bors
Copy link
Contributor

bors commented Jun 13, 2023

⌛ Testing commit edafbaf with merge 2ca8d35...

@bors
Copy link
Contributor

bors commented Jun 13, 2023

☀️ Test successful - checks-actions
Approved by: Nilstrieb
Pushing 2ca8d35 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 13, 2023
@bors bors merged commit 2ca8d35 into rust-lang:master Jun 13, 2023
12 checks passed
@rustbot rustbot added this to the 1.72.0 milestone Jun 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2ca8d35): 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)
4.1% [4.1%, 4.1%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.1% [4.1%, 4.1%] 1

Cycles

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

Binary size

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

Bootstrap: 647.719s -> 647.795s (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

None yet

7 participants