From 7fc0b2f3e29e9d2d4bcdbd82864864da21ddee8c Mon Sep 17 00:00:00 2001 From: Yossi Konstantinovsky Date: Thu, 4 Aug 2016 16:19:52 +0300 Subject: [PATCH] Update E0079 to new format --- src/librustc_typeck/collect.rs | 1 + src/test/compile-fail/E0079.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index 4486748a1f056..d59f07f6c5d69 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -1057,6 +1057,7 @@ fn convert_struct_def<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>, let print_err = |cv: ConstVal| { struct_span_err!(ccx.tcx.sess, e.span, E0079, "mismatched types") .note_expected_found(&"type", &ty_hint, &format!("{}", cv.description())) + .span_label(e.span, &format!("expected '{}' type", ty_hint)) .emit(); }; diff --git a/src/test/compile-fail/E0079.rs b/src/test/compile-fail/E0079.rs index 23957c72ff00e..c9b7f549d5aaa 100644 --- a/src/test/compile-fail/E0079.rs +++ b/src/test/compile-fail/E0079.rs @@ -10,6 +10,7 @@ enum Foo { Q = "32" //~ ERROR E0079 + //~^ expected 'isize' type } fn main() {