Fix up some ‘help’ messages
This commit is contained in:
parent
7f8c687fdf
commit
ed769bf87f
8 changed files with 16 additions and 16 deletions
|
|
@ -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<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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,5 +19,5 @@ fn main() {
|
|||
|
||||
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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,5 +16,5 @@ pub fn main() {
|
|||
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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue