fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
926 B30 linesraw
1error: function pointer types may not have generic parameters
2  --> $DIR/issue-107998.rs:3:18
3   |
4LL | fn with<R>(f: &fn<'a>(x: &'a i32) -> R) -> R {
5   |                  ^^^^
6   |
7help: consider moving the lifetime parameter to a `for` parameter list
8   |
9LL - fn with<R>(f: &fn<'a>(x: &'a i32) -> R) -> R {
10LL + fn with<R>(f: &for<'a> fn(x: &'a i32) -> R) -> R {
11   |
12
13error: lifetime parameter `'a` only used once
14  --> $DIR/issue-107998.rs:3:19
15   |
16LL | fn with<R>(f: &fn<'a>(x: &'a i32) -> R) -> R {
17   |                   ^^      ---
18   |                   |       |
19   |                   |       ...is used only here
20   |                   |       help: elide the single-use lifetime
21   |                   this lifetime...
22   |
23note: the lint level is defined here
24  --> $DIR/issue-107998.rs:1:9
25   |
26LL | #![deny(single_use_lifetimes)]
27   |         ^^^^^^^^^^^^^^^^^^^^
28
29error: aborting due to 2 previous errors
30