1
Fork 0

Better suggestions for Fn trait selection errors

This commit is contained in:
Michael Goulet 2022-03-23 20:57:48 -07:00
parent 6970f88db3
commit e0c8780a5b
8 changed files with 255 additions and 9 deletions

View file

@ -1086,7 +1086,11 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
/// Compares two given types, eliding parts that are the same between them and highlighting
/// relevant differences, and return two representation of those types for highlighted printing.
fn cmp(&self, t1: Ty<'tcx>, t2: Ty<'tcx>) -> (DiagnosticStyledString, DiagnosticStyledString) {
pub fn cmp(
&self,
t1: Ty<'tcx>,
t2: Ty<'tcx>,
) -> (DiagnosticStyledString, DiagnosticStyledString) {
debug!("cmp(t1={}, t1.kind={:?}, t2={}, t2.kind={:?})", t1, t1.kind(), t2, t2.kind());
// helper functions