]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-30255.rs
Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
[rust.git] / src / test / ui / issues / issue-30255.rs
1 //
2 // Test that lifetime elision error messages correctly omit parameters
3 // with no elided lifetimes
4
5 struct S<'a> {
6     field: &'a i32,
7 }
8
9 fn f(a: &S, b: i32) -> &i32 {
10 //~^ ERROR missing lifetime specifier [E0106]
11     panic!();
12 }
13
14 fn g(a: &S, b: bool, c: &i32) -> &i32 {
15 //~^ ERROR missing lifetime specifier [E0106]
16     panic!();
17 }
18
19 fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
20 //~^ ERROR missing lifetime specifier [E0106]
21     panic!();
22 }
23
24 fn main() {}