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: "no method found" error when calling same method twice, with HRTB impl #37154
Comments
sfackler
added
regression-from-stable-to-stable
T-compiler
labels
Oct 13, 2016
This comment has been minimized.
This comment has been minimized.
|
In case it's useful to anyone, here's a EDIT: Here is the log with In particular, the first call causes this:
While the log contains 2 (not sure why not just one) occurrences of this (this logging statement was added by me, so don't go searching the logs from master), after the first call has been resolved:
Which then causes |
alexcrichton
added
the
I-nominated
label
Oct 13, 2016
jonas-schievink
referenced this issue
Oct 14, 2016
Closed
ICE, possibly related to associated types of associated types? #36325
This comment has been minimized.
This comment has been minimized.
|
This, like #36325, was introduced between these two nightlies: Works on
Broken on
These regressions likely have the same cause. I suspect the projection cache, introduced in #33816. |
This comment has been minimized.
This comment has been minimized.
|
The projection cache indeed looks like it. |
nikomatsakis
self-assigned this
Oct 17, 2016
This comment has been minimized.
This comment has been minimized.
|
So yes did a bit of digging and the projection cache is indeed doing some inappropriate caching here. I have a hacky fix; currently debating about a mildly less hacky one. Still not overly happy with how we handle skolemization today but that's another story. =) |
nikomatsakis
added a commit
to nikomatsakis/rust
that referenced
this issue
Oct 19, 2016
nikomatsakis
referenced this issue
Oct 19, 2016
Merged
remove keys w/ skolemized regions from proj cache when popping skolemized regions #37294
This comment has been minimized.
This comment has been minimized.
|
Pending PR: #37294 |
This comment has been minimized.
This comment has been minimized.
|
Thanks @nikomatsakis ! |
mbrubeck commentedOct 13, 2016
•
edited
The following code (playground link) results in a method resolution error on the second call to
x.method(). It compiles successfully ifx.method()is called only once:The error is:
@jonas-schievink suggested this might be a bug in the projection cache or some other cache.
This is a regression from Rust 1.10.0-stable to 1.11.0-stable.