Fix ICE in diagnostic_hir_wf_check

This commit is contained in:
Fabian Wolff 2021-07-27 22:24:43 +02:00
parent 70f74719a9
commit dbd0fd2c2a
4 changed files with 35 additions and 7 deletions

View file

@ -240,8 +240,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
let mut err = match *error {
SelectionError::Unimplemented => {
// If this obligation was generated as a result of well-formed checking, see if we
// can get a better error message by performing HIR-based well formed checking.
// If this obligation was generated as a result of well-formedness checking, see if we
// can get a better error message by performing HIR-based well-formedness checking.
if let ObligationCauseCode::WellFormed(Some(wf_loc)) =
root_obligation.cause.code.peel_derives()
{