diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs index be2b3026755..d9fedf61b4c 100644 --- a/src/librustc/middle/resolve_lifetime.rs +++ b/src/librustc/middle/resolve_lifetime.rs @@ -457,11 +457,11 @@ impl<'a> LifetimeContext<'a> { format!("lifetime name `{}` shadows another \ lifetime name that is already in scope", token::get_name(lifetime.name)).as_slice()); - self.sess.span_help( + self.sess.span_note( lifetime_def.span, format!("shadowed lifetime `{}` declared here", token::get_name(lifetime.name)).as_slice()); - self.sess.span_help( + self.sess.span_note( lifetime.span, "shadowed lifetimes are deprecated \ and will become a hard error before 1.0"); diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index ad8a062fd92..462989b3333 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -886,14 +886,14 @@ fn ast_ty_to_trait_ref<'tcx>(this: &AstConv<'tcx>, pprust::ty_to_string(ty)); match ty.node { ast::TyRptr(None, ref mut_ty) => { - span_note!(this.tcx().sess, ty.span, + span_help!(this.tcx().sess, ty.span, "perhaps you meant `&{}({} +{})`? (per RFC 438)", ppaux::mutability_to_string(mut_ty.mutbl), pprust::ty_to_string(&*mut_ty.ty), pprust::bounds_to_string(bounds)); } ast::TyRptr(Some(ref lt), ref mut_ty) => { - span_note!(this.tcx().sess, ty.span, + span_help!(this.tcx().sess, ty.span, "perhaps you meant `&{} {}({} +{})`? (per RFC 438)", pprust::lifetime_to_string(lt), ppaux::mutability_to_string(mut_ty.mutbl), @@ -902,7 +902,7 @@ fn ast_ty_to_trait_ref<'tcx>(this: &AstConv<'tcx>, } _ => { - span_note!(this.tcx().sess, ty.span, + span_help!(this.tcx().sess, ty.span, "perhaps you forgot parentheses? (per RFC 438)"); } } diff --git a/src/librustc_typeck/check/closure.rs b/src/librustc_typeck/check/closure.rs index 87287fe1d7b..ffec1421f92 100644 --- a/src/librustc_typeck/check/closure.rs +++ b/src/librustc_typeck/check/closure.rs @@ -51,7 +51,7 @@ pub fn check_expr_closure<'a,'tcx>(fcx: &FnCtxt<'a,'tcx>, check_unboxed_closure(fcx, expr, kind, decl, body, None); span_err!(fcx.ccx.tcx.sess, expr.span, E0187, - "can't infer the \"kind\" of the closure, explicitly annotate it. e.g. \ + "can't infer the \"kind\" of the closure; explicitly annotate it; e.g. \ `|&:| {{}}`"); }, Some((sig, kind)) => { diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1a296d39360..865a7110696 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2921,7 +2921,7 @@ impl<'a> Parser<'a> { "Chained comparison operators require parentheses"); if op == BiLt && outer_op == BiGt { self.span_help(op_span, - "Use ::< instead of < if you meant to specify type arguments."); + "use ::< instead of < if you meant to specify type arguments"); } } _ => {} diff --git a/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs b/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs index 41a0be37add..db67249bbd9 100644 --- a/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs +++ b/src/test/compile-fail/hrtb-precedence-of-plus-error-message.rs @@ -19,17 +19,17 @@ trait Bar { struct Foo<'a> { a: &'a Bar+'a, //~^ ERROR E0178 - //~^^ NOTE perhaps you meant `&'a (Bar + 'a)`? + //~^^ HELP perhaps you meant `&'a (Bar + 'a)`? b: &'a mut Bar+'a, //~^ ERROR E0178 - //~^^ NOTE perhaps you meant `&'a mut (Bar + 'a)`? + //~^^ HELP perhaps you meant `&'a mut (Bar + 'a)`? c: Box, // OK, no paren needed in this context d: fn() -> Bar+'a, //~^ ERROR E0178 - //~^^ NOTE perhaps you forgot parentheses + //~^^ HELP perhaps you forgot parentheses //~^^^ WARN deprecated syntax } diff --git a/src/test/compile-fail/require-parens-for-chained-comparison.rs b/src/test/compile-fail/require-parens-for-chained-comparison.rs index 7513815ad73..f5d8c574814 100644 --- a/src/test/compile-fail/require-parens-for-chained-comparison.rs +++ b/src/test/compile-fail/require-parens-for-chained-comparison.rs @@ -19,5 +19,5 @@ fn main() { f(); //~^ ERROR: Chained comparison operators require parentheses - //~^^ HELP: Use ::< instead of < if you meant to specify type arguments. + //~^^ HELP: use ::< instead of < if you meant to specify type arguments } diff --git a/src/test/compile-fail/shadowed-lifetime.rs b/src/test/compile-fail/shadowed-lifetime.rs index 57a2744d8f8..bf8a8f5046e 100644 --- a/src/test/compile-fail/shadowed-lifetime.rs +++ b/src/test/compile-fail/shadowed-lifetime.rs @@ -13,18 +13,18 @@ struct Foo<'a>(&'a isize); impl<'a> Foo<'a> { - //~^ HELP shadowed lifetime `'a` declared here + //~^ NOTE shadowed lifetime `'a` declared here fn shadow_in_method<'a>(&'a self) -> &'a isize { //~^ WARNING lifetime name `'a` shadows another lifetime name that is already in scope - //~| HELP deprecated + //~| NOTE deprecated self.0 } fn shadow_in_type<'b>(&'b self) -> &'b isize { - //~^ HELP shadowed lifetime `'b` declared here + //~^ NOTE shadowed lifetime `'b` declared here let x: for<'b> fn(&'b isize) = panic!(); //~^ WARNING lifetime name `'b` shadows another lifetime name that is already in scope - //~| HELP deprecated + //~| NOTE deprecated self.0 } diff --git a/src/test/compile-fail/unsized2.rs b/src/test/compile-fail/unsized2.rs index 604f7ba3255..a47d81e38cc 100644 --- a/src/test/compile-fail/unsized2.rs +++ b/src/test/compile-fail/unsized2.rs @@ -16,5 +16,5 @@ pub fn main() { f(); //~^ ERROR expected identifier, found keyword `type` //~^^ ERROR: Chained comparison operators require parentheses - //~^^^ HELP: Use ::< instead of < if you meant to specify type arguments. + //~^^^ HELP: use ::< instead of < if you meant to specify type arguments }