Skip to content

Correctly check for opaque types in assoc_ty_def - #67867

Merged
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:opaque-assoc-lookup
Jan 12, 2020
Merged

Correctly check for opaque types in assoc_ty_def#67867
bors merged 1 commit into
rust-lang:masterfrom
matthewjasper:opaque-assoc-lookup

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor

Closes#67856

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @zackmdavis

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

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 4, 2020
Comment threadsrc/test/ui/impl-trait/incoherent-assoc-imp-trait.rs Outdated
@CentrilCentril added the F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` label Jan 4, 2020
@matthewjasper

Copy link
Copy Markdown
ContributorAuthor

@oli-obk Do you want to review this?

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
Copy Markdown
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
Copy Markdown
Contributor

r? @oli-obk

@bors r+

@bors

bors commented Jan 11, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit 5e92625 has been approved by oli-obk

@borsbors 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`
Closesrust-lang#67856
@CentrilCentril mentioned this pull request Jan 12, 2020
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:masterJan 12, 2020
@matthewjasper
matthewjasper deleted the opaque-assoc-lookup branch January 12, 2020 09:22
Sign up for freeto 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-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

6 participants

@matthewjasper@rust-highfive@oli-obk@bors@Centril@zackmdavis