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");
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),
}
_ => {
- span_note!(this.tcx().sess, ty.span,
+ span_help!(this.tcx().sess, ty.span,
"perhaps you forgot parentheses? (per RFC 438)");
}
}
fcx.ccx.tcx.sess.span_err(
expr.span,
- "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)) => {
"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");
}
}
_ => {}
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<Bar+'a>, // 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
}
f<X>();
//~^ 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
}
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
}
f<type>();
//~^ 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
}