1 error[E0106]: missing lifetime specifier
2 --> $DIR/issue-30255.rs:9:24
4 LL | fn f(a: &S, b: i32) -> &i32 {
5 | -- ^ expected named lifetime parameter
7 = help: this function's return type contains a borrowed value, but the signature does not say which one of `a`'s 2 lifetimes it is borrowed from
8 help: consider introducing a named lifetime parameter
10 LL | fn f<'a>(a: &'a S, b: i32) -> &'a i32 {
13 error[E0106]: missing lifetime specifier
14 --> $DIR/issue-30255.rs:14:34
16 LL | fn g(a: &S, b: bool, c: &i32) -> &i32 {
17 | -- ---- ^ expected named lifetime parameter
19 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from one of `a`'s 2 lifetimes or `c`
20 help: consider introducing a named lifetime parameter
22 LL | fn g<'a>(a: &'a S, b: bool, c: &'a i32) -> &'a i32 {
23 | ^^^^ ^^^^^ ^^^^^^^ ^^^
25 error[E0106]: missing lifetime specifier
26 --> $DIR/issue-30255.rs:19:44
28 LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
29 | ----- -- ---- ^ expected named lifetime parameter
31 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `a`, one of `c`'s 2 lifetimes, or `d`
32 help: consider introducing a named lifetime parameter
34 LL | fn h<'a>(a: &'a bool, b: bool, c: &'a S, d: &'a i32) -> &'a i32 {
35 | ^^^^ ^^^^^^^^ ^^^^^ ^^^^^^^ ^^^
37 error: aborting due to 3 previous errors
39 For more information about this error, try `rustc --explain E0106`.