Better diagnostics when mismatched types due to implict static lifetime

This commit is contained in:
jackh726
2021-07-15 10:03:39 -04:00
parent 77d155973c
commit 3cd5ad5cd7
11 changed files with 168 additions and 24 deletions

View File

@@ -333,6 +333,9 @@ pub enum ObligationCauseCode<'tcx> {
/// This is purely for diagnostic purposes - it is always
/// correct to use `MiscObligation` instead
WellFormed(Option<hir::HirId>),
/// From `match_impl`. The cause for us having to match an impl, and the DefId we are matching against.
MatchImpl(Lrc<ObligationCauseCode<'tcx>>, DefId),
}
impl ObligationCauseCode<'_> {