2016-05-18 00:02:04 -05:00
|
|
|
//
|
|
|
|
// Test that lifetime elision error messages correctly omit parameters
|
|
|
|
// with no elided lifetimes
|
|
|
|
|
|
|
|
struct S<'a> {
|
|
|
|
field: &'a i32,
|
|
|
|
}
|
|
|
|
|
|
|
|
fn f(a: &S, b: i32) -> &i32 {
|
|
|
|
//~^ ERROR missing lifetime specifier [E0106]
|
|
|
|
panic!();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn g(a: &S, b: bool, c: &i32) -> &i32 {
|
|
|
|
//~^ ERROR missing lifetime specifier [E0106]
|
|
|
|
panic!();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
|
|
|
|
//~^ ERROR missing lifetime specifier [E0106]
|
|
|
|
panic!();
|
|
|
|
}
|
|
|
|
|
2017-12-12 14:46:33 -06:00
|
|
|
fn main() {}
|