diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-07-27 19:05:32 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-27 19:05:32 +0900 |
| commit | 3b780fc2792c471c6fc1491e08d4523629ec222e (patch) | |
| tree | 9a7b0c9457e55ff6aa7d95fda1a5e53a0792d163 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp | |
| parent | ff693dc7b8119a1761edf0d08156bb670708824a (diff) | |
| parent | 5e8f1e80d8bff9995bbc34a959b8aa75e2a5cc00 (diff) | |
| download | rust-3b780fc2792c471c6fc1491e08d4523629ec222e.tar.gz rust-3b780fc2792c471c6fc1491e08d4523629ec222e.zip | |
Rollup merge of #99079 - compiler-errors:issue-99073, r=oli-obk
Check that RPITs constrained by a recursive call in a closure are compatible Fixes #99073 Adapts a similar visitor pattern to `find_opaque_ty_constraints` (that we use to check TAITs), but with some changes: 0. Only walk the "OnlyBody" children, instead of all items in the RPIT's defining scope 1. Only walk through the body's children if we found a constraining usage 2. Don't actually do any inference, just do a comparison and error if they're mismatched ---- r? `@oli-obk` -- you know all this impl-trait stuff best... is this the right approach? I can explain the underlying issue better if you'd like, in case that might reveal a better solution. Not sure if it's possible to gather up the closure's defining usages of the RPIT while borrowck'ing the outer function, that might be a better place to put this check...
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions
