-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Object types should use adjustments, include mutability #5762
Comments
As part of this work, we should be using adjustments to deal with borrowing objects and so forth. From a recent IRC conversation with @Sodel-the-Vociferous:
A simple test case (which works today, but not via the intended paths) would be:
|
Modified title to be more pithy. |
Is @pcwalton's old pull request #5597 relevant to coercing ~/@traits to &Traits? From the look of those commits, this could be more involved than I had hoped. Would it be worthwhile to get that patch set working with the latest Also, note that my above commits have borked something in compile-time checking of objects' methods. I'll try to set aside some time to debug that sometime in the next few days. |
@Sodel-the-Vociferous that PR is not all that relevant, actually, it addresses a different issue. |
@Sodel-the-Vociferous I'll try to find some time to checkout your patch and build it... |
@nikomatsakis Ah, good. On I go debugging, then! |
FIXMEs in question are still alive, this looks legit still. |
Status update: I got a version of this building, bsaed on Sodel-the-V's branch, but encountered a problem with how method lookup is defined. I embarked to rewrite method lookup to fix this problem but haven't finished that work. The problem is a quesiton of how we prioritize methods: I believe we have to prioritize inherent methods over trait methods. Bonus is that I would expect this to improve compilation time. |
…anishearth Stable sort primitive changelog: Implements rust-lang#5762
Object types are currently quite hacky in method lookup and in the compiler. They don't include mutability information, for example, and they are not transformed like other pointer types during method lookup etc. This should be rectified so that they are basically treated like
ty_evec
. There are various FIXMEs for this (or there will be in the code that lands to fix #5656).cc #5527
The text was updated successfully, but these errors were encountered: