Rollup merge of #100437 - compiler-errors:better-const-mismatch-err, r=oli-obk
Improve const mismatch `FulfillmentError` Fixes #100414
This commit is contained in:
commit
26c86c6993
16 changed files with 194 additions and 45 deletions
|
@ -469,6 +469,13 @@ impl<'tcx> ObligationCauseCode<'tcx> {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn peel_match_impls(&self) -> &Self {
|
||||
match self {
|
||||
MatchImpl(cause, _) => cause.code(),
|
||||
_ => self,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// `ObligationCauseCode` is used a lot. Make sure it doesn't unintentionally get bigger.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue