-
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
Remove implicit binder from FnSpace
in VecPerParamSpace
(fixes #20526)
#29463
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @pnkfelix (or others on @rust-lang/compiler) |
Also, can you be sure to add a test as well? Thanks! |
I didn't think a test was needed since the issue is that there is unnecessary complexity in the type folder, not that anything is incorrect. The issue is marked I-cleanup. Removing the implicit binder around a |
Oh sorry I should have at least read the referenced issue, carry on :) |
d931297
to
56dde40
Compare
What is the status of this pull request? |
I think we may be missing a test here. This branch seems good, but it feels like it was a bit too easy. Diving into the code, and re-reading my notes to myself, I suspect a missing case might be named, higher-rank lifetimes appearing in methods. I'll have to checkout the branch and play out with making a test. |
FnSpace
in VecPerParamSpace
(fixes #20526)
☔ The latest upstream changes (presumably #30317) made this pull request unmergeable. Please resolve the merge conflicts. |
Sorry I haven't had time to dredge up an example yet of my concern :( I'll try to do that soon. |
8e5dbbc
to
a1133bb
Compare
☔ The latest upstream changes (presumably #32432) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks for keeping this up to date @jseyfried! Sorry that this review is taking so long. :( I'll ping Niko on IRC to see if he can spare a moment for this between all his MIR work. |
Yeah, I've been putting off trying to work up that example. Always a On Mon, Mar 28, 2016 at 07:23:26PM -0700, Ben Striegel wrote:
|
OK, so, I finally went back to this branch. I can't quite figure out what I was worried about. I still remain a sense of unease, because I think that the "resolve_lifetimes" code assumes that there is a binder around methods -- but if it's compiling rustc, I admit it's probably working ok. I started a crater run just to be safe. If that comes back clean, we can land -- if we encounter problems, they'll show up as ICEs soon enough. |
@nikomatsakis ok, sounds good. I looked through the relevant code in more detail and I am confident that this is correct. The When converting these |
@jseyfried it may be, but it seems odd that I went out of my way to add an extra level of binder in this case -- clearly it was necessary at some point. (And in fact I remember vaguely that there was some tricky bug that took me a while to track down, for which this was the fix.) But then again, as I said, if things are working, I guess it means we refactored that at some point. |
We refactored the method handling code to be saner a while ago. |
@bors r+ OK, I give up. Crater run was clean. :) Sorry for holding things up so long over a vague (and unsubstantiated) fear, @jseyfried. |
📌 Commit 588e0f9 has been approved by |
Remove implicit binder from `FnSpace` in `VecPerParamSpace` (fixes #20526) This removes the implicit binder from `FnSpace` in `VecPerParamSpace` so that `Binder<T>` is the only region binder (as described in issue #20526), and refactors away `enter_region_binder` and `exit_region_binder` from `TypeFolder`.
No problem! |
This removes the implicit binder from
FnSpace
inVecPerParamSpace
so thatBinder<T>
is the only region binder (as described in issue #20526), and refactors awayenter_region_binder
andexit_region_binder
fromTypeFolder
.