about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/lib.rs
AgeCommit message (Collapse)AuthorLines
2021-09-27Improve cause information for NLL higher-ranked errorsAaron Hill-1/+1
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.
2021-08-23handle ascription type op in NLL HRTB diagnosticsRémy Rakic-1/+1
Refactors the `type_op_ascribe_user_type` query into a version which accepts a span, and uses it in the nicer NLL HRTB bound region errors.
2021-08-15De-dupe NLL HRTB diagnostics' use of `type_op_prove_predicate`Rémy Rakic-0/+2
2021-05-23Stabilize ops::ControlFlow (just the type)Scott McMurray-1/+0
2020-10-30TypeVisitor: use `ControlFlow` in rustc_{mir,privacy,traits,typeck}LeSeulArtichaut-0/+1
2020-09-17Remove redundant #![feature(...)] 's from compiler/est31-1/+0
2020-08-30mv compiler to compiler/mark-0/+33