]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/infer/error_reporting/note.rs
New upstream version 1.25.0+dfsg1
[rustc.git] / src / librustc / infer / error_reporting / note.rs
index e46613b3e4da0cd0fa804878c50ae8d1c12193fc..02ec9fe74c1fe693bf5c24e60da393c93c170266 100644 (file)
@@ -23,12 +23,10 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
                 if let Some((expected, found)) = self.values_str(&trace.values) {
                     let expected = expected.content();
                     let found = found.content();
-                    // FIXME: do we want a "the" here?
-                    err.span_note(trace.cause.span,
-                                  &format!("...so that {} (expected {}, found {})",
-                                           trace.cause.as_requirement_str(),
-                                           expected,
-                                           found));
+                    err.note(&format!("...so that the {}:\nexpected {}\n   found {}",
+                                      trace.cause.as_requirement_str(),
+                                      expected,
+                                      found));
                 } else {
                     // FIXME: this really should be handled at some earlier stage. Our
                     // handling of region checking when type errors are present is