Skip to content

Commit 8189a45

Browse files
Use ExprItemObligation and ExprBindingObligation too
1 parent d464d3a commit 8189a45

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_trait_selection/src/traits/error_reporting

1 file changed

+3
-1
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,9 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
15141514
);
15151515
let code = error.obligation.cause.code().peel_derives().peel_match_impls();
15161516
if let ObligationCauseCode::BindingObligation(..)
1517-
| ObligationCauseCode::ItemObligation(..) = code
1517+
| ObligationCauseCode::ItemObligation(..)
1518+
| ObligationCauseCode::ExprBindingObligation(..)
1519+
| ObligationCauseCode::ExprItemObligation(..) = code
15181520
{
15191521
self.note_obligation_cause_code(
15201522
&mut diag,

0 commit comments

Comments
 (0)