-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
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
@@ -2977,7 +2988,7 @@ fn associated_item_def_ids<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, | |||
.map(|id| tcx.hir.local_def_id(id.node_id)) | |||
.collect() | |||
} | |||
hir::ItemKind::TraitAlias(..) => vec![], | |||
hir::ItemKind::TraitAlias(..) => todo, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense.
@nikomatsakis Okay, I'm making decent headway now I think. Any advice on writing |
58c48a0
to
a3f8fb9
Compare
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? :-) |
a3f8fb9
to
ec29f91
Compare
This comment has been minimized.
This comment has been minimized.
ec29f91
to
3955efa
Compare
This comment has been minimized.
This comment has been minimized.
db6052d
to
81b3a6e
Compare
This comment has been minimized.
This comment has been minimized.
229f544
to
067abd5
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
067abd5
to
d54155b
Compare
@bors retry r- |
388f9be
to
aae4bf0
Compare
aae4bf0
to
4171685
Compare
📌 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