about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-27 21:29:19 +0000
committerbors <bors@rust-lang.org>2021-09-27 21:29:19 +0000
commit8a12be741290b16c29293f87bdb3e8e5129bd4a9 (patch)
tree8f10ec28936aa5bc33fcd1b19880a89c23ddfec5 /compiler/rustc_codegen_llvm/src
parent98c8619502093f34ca82f8f26ccf32e753924440 (diff)
parent41ad383e111423ba3f3062ede1354da4e0673e3d (diff)
downloadrust-8a12be741290b16c29293f87bdb3e8e5129bd4a9.tar.gz
rust-8a12be741290b16c29293f87bdb3e8e5129bd4a9.zip
Auto merge of #89249 - Aaron1011:higher-ranked-cause, r=estebank
Improve cause information for NLL higher-ranked errors

This PR has several interconnected pieces:

1. In some of the NLL region error code, we now pass
   around an `ObligationCause`, instead of just a plain `Span`.
   This gets forwarded into `fulfill_cx.register_predicate_obligation`
   during error reporting.
2. The general InferCtxt error reporting code is extended to
   handle `ObligationCauseCode::BindingObligation`
3. A new enum variant `ConstraintCategory::Predicate` is added.
   We try to avoid using this as the 'best blame constraint' - instead,
   we use it to enhance the `ObligationCause` of the `BlameConstraint`
   that we do end up choosing.

As a result, several NLL error messages now contain the same
"the lifetime requirement is introduced here" message as non-NLL
errors.

Having an `ObligationCause` available will likely prove useful
for future improvements to NLL error messages.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions