about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-05-07 00:29:23 +0000
committerGitHub <noreply@github.com>2025-05-07 00:29:23 +0000
commitbda326f40c97ad68d16a23644ceb4ba2242bbd0f (patch)
tree7322869ddcd114e84ec3b40f6767c4758f79f04b /library/std/src
parent25631ff0931f68057ff826208ca1caaaed294057 (diff)
parent431f02d5312544d222a63d40586527ec704f2d13 (diff)
downloadrust-bda326f40c97ad68d16a23644ceb4ba2242bbd0f.tar.gz
rust-bda326f40c97ad68d16a23644ceb4ba2242bbd0f.zip
Rollup merge of #140607 - lcnr:opaque-type-storage, r=compiler-errors
support duplicate entries in the opaque_type_storage

Necessary for the new solver as we may unify keys when eagerly resolving for canonical queries. See the relevant comment when instantiating query responses:
```rust
            // We eagerly resolve inference variables when computing the query response.
            // This can cause previously distinct opaque type keys to now be structurally equal.
            //
            // To handle this, we store any duplicate entries in a separate list to check them
            // at the end of typeck/borrowck. We could alternatively eagerly equate the hidden
            // types here. However, doing so is difficult as it may result in nested goals and
            // any errors may make it harder to track the control flow for diagnostics.
            if let Some(prev) = prev {
                self.delegate.add_duplicate_opaque_type(key, prev, self.origin_span);
            }
```

This will be far more relevant with #140497.

r? `@compiler-errors`
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions