Skip to content
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

Merged
merged 1 commit into from
Jan 12, 2020

Conversation

matthewjasper
Copy link
Contributor

Closes #67856

@rust-highfive
Copy link
Collaborator

r? @zackmdavis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 4, 2020
@Centril Centril added the F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` label Jan 4, 2020
@matthewjasper
Copy link
Contributor Author

@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)
Copy link
Contributor

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

@oli-obk
Copy link
Contributor

oli-obk commented Jan 11, 2020

r? @oli-obk

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2020

📌 Commit 5e92625 has been approved by oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned zackmdavis Jan 11, 2020
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2020
Centril added a commit to Centril/rust that referenced this pull request Jan 12, 2020
…r=oli-obk

Correctly check for opaque types in `assoc_ty_def`

Closes rust-lang#67856
bors added a commit that referenced this pull request Jan 12, 2020
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
@bors bors merged commit 5e92625 into rust-lang:master Jan 12, 2020
@matthewjasper matthewjasper deleted the opaque-assoc-lookup branch January 12, 2020 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
6 participants