]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #99383 - ouz-a:issue_57961, r=oli-obk
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Wed, 20 Jul 2022 10:47:19 +0000 (16:17 +0530)
committerGitHub <noreply@github.com>
Wed, 20 Jul 2022 10:47:19 +0000 (16:17 +0530)
Formalize defining_use_anchor

This tackles issue #57961

Introduces new enum called `DefiningAnchor` that replaces `Option<LocalDefId>` of `defining_use_anchor`. Now every use of it is explicit and exhaustively matched, catching errors like one in the linked issue. This is not a perfect fix but it's a step in the right direction.

r? `@oli-obk`

1  2 
compiler/rustc_infer/src/infer/opaque_types.rs