]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-19707.stderr
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-19707.stderr
CommitLineData
ff7c6d11 1error[E0106]: missing lifetime specifier
0731742a 2 --> $DIR/issue-19707.rs:3:28
ff7c6d11 3 |
532ac7d7 4LL | type Foo = fn(&u8, &u8) -> &u8;
72b1a166 5 | --- --- ^ expected named lifetime parameter
ff7c6d11
XL
6 |
7 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
72b1a166
FG
8 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
9help: consider making the type lifetime-generic with a new `'a` lifetime
10 |
11LL | type Foo = for<'a> fn(&'a u8, &'a u8) -> &'a u8;
12 | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^
46de9a89
FG
13help: consider introducing a named lifetime parameter
14 |
72b1a166
FG
15LL | type Foo<'a> = fn(&'a u8, &'a u8) -> &'a u8;
16 | ^^^^ ^^^^^^ ^^^^^^ ^^^
ff7c6d11
XL
17
18error[E0106]: missing lifetime specifier
0731742a 19 --> $DIR/issue-19707.rs:5:27
ff7c6d11 20 |
532ac7d7 21LL | fn bar<F: Fn(&u8, &u8) -> &u8>(f: &F) {}
72b1a166 22 | --- --- ^ expected named lifetime parameter
ff7c6d11
XL
23 |
24 = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from argument 1 or argument 2
72b1a166
FG
25 = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
26help: consider making the bound lifetime-generic with a new `'a` lifetime
27 |
28LL | fn bar<F: for<'a> Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
29 | ^^^^^^^ ^^^^^^ ^^^^^^ ^^^
46de9a89
FG
30help: consider introducing a named lifetime parameter
31 |
72b1a166
FG
32LL | fn bar<'a, F: Fn(&'a u8, &'a u8) -> &'a u8>(f: &F) {}
33 | ^^^ ^^^^^^ ^^^^^^ ^^^
ff7c6d11
XL
34
35error: aborting due to 2 previous errors
36
0531ce1d 37For more information about this error, try `rustc --explain E0106`.