mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
24 lines
463 B
Rust
24 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() {}
|