-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Cleanup rustc/ty part 2 #54743
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #54767) made this pull request unmergeable. Please resolve the merge conflicts. |
Rebased. |
CloneShim(did, ty) => { | ||
did.visit_with(visitor) || | ||
ty.visit_with(visitor) | ||
DropGlue(did, ty) => { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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 ...)
@bors r+ |
📌 Commit 04b99bc has been approved by |
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.
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.
☀️ Test successful - status-appveyor, status-travis |
The second part of cleanups and minor improvements for rustc/ty.
The PR is independent from from the first part.