]> git.lizzy.rs Git - rust.git/blob - src/test/ui/single-use-lifetime/fn-types.stderr
Auto merge of #87150 - rusticstuff:simplify_wrapping_neg, r=m-ou-se
[rust.git] / src / test / ui / single-use-lifetime / fn-types.stderr
1 error: lifetime parameter `'a` only used once
2   --> $DIR/fn-types.rs:9:10
3    |
4 LL |   a: for<'a> fn(&'a u32),
5    |          ^^      -- ...is used only here
6    |          |
7    |          this lifetime...
8    |
9 note: the lint level is defined here
10   --> $DIR/fn-types.rs:1:9
11    |
12 LL | #![deny(single_use_lifetimes)]
13    |         ^^^^^^^^^^^^^^^^^^^^
14
15 error[E0581]: return type references lifetime `'a`, which is not constrained by the fn input types
16   --> $DIR/fn-types.rs:12:22
17    |
18 LL |   d: for<'a> fn() -> &'a u32, // OK, used only in return type.
19    |                      ^^^^^^^
20
21 error: aborting due to 2 previous errors
22
23 For more information about this error, try `rustc --explain E0581`.