about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAdrian Taylor <adetaylor@chromium.org>2024-11-11 16:37:56 +0000
committerAdrian Taylor <adetaylor@chromium.org>2024-12-11 11:59:12 +0000
commit7f7c964e475d36789de0ce1473f696b8b1fc5434 (patch)
tree3da82d80ef234a625fa568e128a952129e516fe9 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parente75660dad3827fab87d96e2c65a7836fd5511b69 (diff)
downloadrust-7f7c964e475d36789de0ce1473f696b8b1fc5434.tar.gz
rust-7f7c964e475d36789de0ce1473f696b8b1fc5434.zip
Arbitrary self types v2: pick diags to stack.
This commit makes no (intentional) functional change.

Previously, the picking process maintained two lists of extra
information useful for diagnostics:

* any unstable candidates which might have been picked
* any unsatisfied predicates

Previously, these were dealt with quite differently - the former list
was passed around as a function parameter; the latter lived in a RefCell
in the ProbeCtxt.

With this change we increase consistency by keeping them together in a
new PickDiagHints structure, passed as a parameter, with no need for
interior mutability.

The lifecycle of each of these lists remains fairly complex, so it's
explained with new comments in pick_core.

A further cleanup here would be to package the widely-used tuple
  (ty::Predicate<'tcx>,
   Option<ty::Predicate<'tcx>>,
   Option<ObligationCause<'tcx>>)
into a named struct for UnsatisfiedPredicate. This seems worth doing but
it turns out that this tuple is used in dozens of places, so if we're
going to do this we should do it as a separate PR to avoid constant
rebase trouble.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions