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

Cleanup rustc/ty part 2 #54743

Merged
merged 5 commits into from Oct 5, 2018
Merged

Cleanup rustc/ty part 2 #54743

merged 5 commits into from Oct 5, 2018

Conversation

ljedrz
Copy link
Contributor

@ljedrz ljedrz commented Oct 2, 2018

The second part of cleanups and minor improvements for rustc/ty.

  • improve allocations
  • calculate span after a possible early continue
  • simplify some patterns
  • mark a comment as FIXME
  • whitespace fixes

The PR is independent from from the first part.

@rust-highfive
Copy link
Collaborator

r? @zackmdavis

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2018
@bors
Copy link
Contributor

bors commented Oct 3, 2018

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

@ljedrz
Copy link
Contributor Author

ljedrz commented Oct 3, 2018

Rebased.

CloneShim(did, ty) => {
did.visit_with(visitor) ||
ty.visit_with(visitor)
DropGlue(did, ty) => {
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this can also be unified with the FnPtrShim | CloneShim arm?

Copy link
Contributor Author

@ljedrz ljedrz Oct 3, 2018

Choose a reason for hiding this comment

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

I tried it at first, but it doesn't typecheck: expected reference, found enum std::option::Option.

Copy link
Member

Choose a reason for hiding this comment

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

OK. (One could argue that the fact that code that looks like its all the same types in fact is not, is itself another cleanup opportunity ...)

@zackmdavis
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 3, 2018

📌 Commit 04b99bc has been approved by zackmdavis

@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 Oct 3, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Oct 3, 2018
Cleanup rustc/ty part 2

The second part of cleanups and minor improvements for rustc/ty.
- improve allocations
- calculate span after a possible early continue
- simplify some patterns
- mark a comment as FIXME
- whitespace fixes

The PR is independent from from the first part.
@bors
Copy link
Contributor

bors commented Oct 5, 2018

⌛ Testing commit 04b99bc with merge fddcd31...

bors added a commit that referenced this pull request Oct 5, 2018
Cleanup rustc/ty part 2

The second part of cleanups and minor improvements for rustc/ty.
- improve allocations
- calculate span after a possible early continue
- simplify some patterns
- mark a comment as FIXME
- whitespace fixes

The PR is independent from from the first part.
@bors
Copy link
Contributor

bors commented Oct 5, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: zackmdavis
Pushing fddcd31 to master...

@bors bors merged commit 04b99bc into rust-lang:master Oct 5, 2018
@ljedrz ljedrz deleted the cleanup_ty_p2 branch October 5, 2018 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants