-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Correctly check for opaque types in assoc_ty_def
#67867
Conversation
r? @zackmdavis (rust_highfive has picked a reviewer for you, use r? to override) |
a783e0c
to
5e92625
Compare
@oli-obk Do you want to review this? |
@@ -1461,7 +1461,7 @@ fn assoc_ty_def( | |||
// cycle error if the specialization graph is currently being built. | |||
let impl_node = specialization_graph::Node::Impl(impl_def_id); | |||
for item in impl_node.items(tcx) { | |||
if item.kind == ty::AssocKind::Type | |||
if matches!(item.kind, ty::AssocKind::Type | ty::AssocKind::OpaqueTy) |
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.
The fix looks correct to me, but now I"m wondering if the bug! below is reachable for opaque types if the impl is missing the associated opaque type item
📌 Commit 5e92625 has been approved by |
…r=oli-obk Correctly check for opaque types in `assoc_ty_def` Closes rust-lang#67856
Rollup of 6 pull requests Successful merges: - #67494 (Constify more of alloc::Layout) - #67867 (Correctly check for opaque types in `assoc_ty_def`) - #67948 (Galloping search for binary_search_util) - #68045 (Move more of `rustc::lint` into `rustc_lint`) - #68089 (Unstabilize `Vec::remove_item`) - #68108 (Add suggestions when encountering chained comparisons) Failed merges: r? @ghost
Closes #67856