Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRegression: overflow while adding drop-check rules #29844
Comments
Manishearth
added
I-nominated
regression-from-stable-to-beta
labels
Nov 15, 2015
This comment has been minimized.
This comment has been minimized.
|
Trait matching creates a region that is equated with our current region each time it runs, but our recursion-detection can't handle this. Annoying. I think we should have a unification system for regions to deal with this (ping @nikomatsakis). |
This comment has been minimized.
This comment has been minimized.
neon64
commented
Nov 20, 2015
|
Hi, I discovered this regression as I was fiddling around with one of my projects, and therefore I'm pretty motivated to try and fix it as it currently prevents me from continuing. I took a look at where the error was reported inside @arielb1 the 'unification system for regions' sounds pretty complex, but if it is possible to explain the workings of that to a mere mortal like me then I'd be happy to do the 'plumbing' work on any implementation. Also I find I solve problems a lot by visualising the data etc, and I was wondering how you handle debugging. I've recently switched from 'managed' languages like Java and I really miss the complete runtime inspection capabilities of something like the IntelliJ idea debugger. Is it possible to use |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
A unification system for regions isn't something I would want a beginner to do - either me or @nikomatsakis should do it. I do most of my rustc debugging by using the logs - |
arielb1
added
the
T-compiler
label
Nov 20, 2015
This comment has been minimized.
This comment has been minimized.
|
@arielb1 yes, I've encountered this problem, but I am not sure what answer I prefer. A unification system for regions is one thing I considered, along with an alternate scheme for inferring substitutions. I had the latter up and working (I can't find the branch just now) but was dissatisfied with it in some ways that I don't remember now -- the main thing was that instead of creating fresh type variables for every impl parameter, it would first try to deduce the values for the type variables by looking at the trait reference. e.g., if we had |
This comment has been minimized.
This comment has been minimized.
|
I was also thinking of some kind of "trait IR" to speed up trait matching, but the full set of required operations requires some kind of unification, so we will not completely eliminate the problem. Maybe I should be working on region unification? |
This comment has been minimized.
This comment has been minimized.
|
triage: P-high This is a regression, so giving P-high, but given that the fix may involve changing some fundamental infrastructure we have to be a bit wary. |
nikomatsakis
self-assigned this
Dec 3, 2015
arielb1
assigned
arielb1
and unassigned
nikomatsakis
Dec 3, 2015
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
Dec 6, 2015
arielb1
referenced this issue
Dec 6, 2015
Merged
[WIP] introduce a region unification table and use it in dropck #30242
arielb1
added a commit
to arielb1/rust
that referenced
this issue
Dec 7, 2015
nikomatsakis
added a commit
to nikomatsakis/rust
that referenced
this issue
Dec 8, 2015
This comment has been minimized.
This comment has been minimized.
|
@arielb1 I found that branch I was talking about (which required running https://github.com/nikomatsakis/rust/tree/dropck-infinite-recursion It does make this test case pass. I am running all tests now to see if the rest pass. I've only rebased the code but not deeply re-reviewed it. In particular, I don't remember what I didn't like about it. |
This comment has been minimized.
This comment has been minimized.
|
Looks like this will hit 1.5 stable tomorrow? |
brson
added
regression-from-stable-to-stable
and removed
regression-from-stable-to-beta
labels
Dec 9, 2015
This comment has been minimized.
This comment has been minimized.
|
Possibly worth considering a point release. |
bors
added a commit
that referenced
this issue
Dec 12, 2015
bors
added a commit
that referenced
this issue
Dec 12, 2015
bors
closed this
in
#30242
Dec 12, 2015
This comment has been minimized.
This comment has been minimized.
neon64
commented
Dec 12, 2015
|
Thanks so much guys for being able to fix this. It is great to be part of a community that is willing to help others, and I realise now that I wouldn't have been able to fix it myself. |
This comment has been minimized.
This comment has been minimized.
|
Sorry for the mess. My patch got a little delayed, and then I had a cold (I'm better now). |
This comment has been minimized.
This comment has been minimized.
|
Our team should try to be better with things slipping than that, though. |
Manishearth commentedNov 15, 2015
https://users.rust-lang.org/t/drop-check-regression-overflow-while-adding-drop-check-rules-for-struct/3617
playpen
gives the error
cc @pnkfelix