]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-30255.stderr
Auto merge of #78066 - bugadani:wat, r=jonas-schievink
[rust.git] / src / test / ui / issues / issue-30255.stderr
1 error[E0106]: missing lifetime specifier
2   --> $DIR/issue-30255.rs:9:24
3    |
4 LL | fn f(a: &S, b: i32) -> &i32 {
5    |         --             ^ expected named lifetime parameter
6    |
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
9    |
10 LL | fn f<'a>(a: &'a S, b: i32) -> &'a i32 {
11    |     ^^^^    ^^^^^             ^^^
12
13 error[E0106]: missing lifetime specifier
14   --> $DIR/issue-30255.rs:14:34
15    |
16 LL | fn g(a: &S, b: bool, c: &i32) -> &i32 {
17    |         --              ----     ^ expected named lifetime parameter
18    |
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
21    |
22 LL | fn g<'a>(a: &'a S, b: bool, c: &'a i32) -> &'a i32 {
23    |     ^^^^    ^^^^^              ^^^^^^^     ^^^
24
25 error[E0106]: missing lifetime specifier
26   --> $DIR/issue-30255.rs:19:44
27    |
28 LL | fn h(a: &bool, b: bool, c: &S, d: &i32) -> &i32 {
29    |         -----              --     ----     ^ expected named lifetime parameter
30    |
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
33    |
34 LL | fn h<'a>(a: &'a bool, b: bool, c: &'a S, d: &'a i32) -> &'a i32 {
35    |     ^^^^    ^^^^^^^^              ^^^^^     ^^^^^^^     ^^^
36
37 error: aborting due to 3 previous errors
38
39 For more information about this error, try `rustc --explain E0106`.