rust/src/test/ui/issues/issue-30255.rs
2018-12-25 21:08:33 -07:00

25 lines
463 B
Rust

//
// 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!();
}
fn main() {}