Implement trait aliases (RFC 1733)#55101
Conversation
|
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
|
@petrochenkov Don't even bother reviewing yet. A lot of work to go. I'll let you know when things are at a decent stage. :-) I think @nikomatsakis is going to comment with some more guidance shortly. |
src/librustc/ty/mod.rs
Outdated
There was a problem hiding this comment.
This should just return vec!. Trait aliases do not define any associated items themselves. The associated item resolution code does have a notion of walking the superpredicates when doing lookups, I would think we should build on that.
|
@nikomatsakis Okay, I'm making decent headway now I think. Any advice on writing |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis Great. I’ll fix that quickly, but it’s basically already working fine. Any advice on trait objects? :-) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis As long as you're happy with things now, LGTM! |
nikomatsakis
left a comment
There was a problem hiding this comment.
Somehow I expected a bit more on trait objects, but actually I can imagine how what you have would work! Nice! My main comment is that I'd like to see more exhaustive tests. I'll leave a comment below.
|
This looks awesome. I went through the RFC and drew up a list of tests covering everything that I saw in there. Do you think you could check whether all of these scenarios are being tested, and add those that are not? Here is the list, inlined for convenience: Things to test:
|
|
Also, I think it'd be ideal to put all the trait-alias tests in a directory like |
Sure. Should test names still be prefixed with |
|
Looks good. We already test most of these, but I'll go ensure they're all there now. Thanks for making the list.
|
This comment has been minimized.
This comment has been minimized.
|
@bors r- |
|
@bors retry r- |
|
📌 Commit 4171685 has been approved by |
Implement trait aliases (RFC 1733) Extends groundwork done in #45047, and fully implements rust-lang/rfcs#1733. CC @durka @nikomatsakis
|
☀️ Test successful - status-appveyor, status-travis |
Extends groundwork done in #45047, and fully implements rust-lang/rfcs#1733.
CC @durka @nikomatsakis