fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
838 B28 linesraw
1error: lifetime parameter `'a` only used once
2  --> $DIR/one-use-in-inherent-method-argument.rs:12:19
3   |
4LL |     fn inherent_a<'a>(&self, data: &'a u32) {
5   |                   ^^                -- ...is used only here
6   |                   |
7   |                   this lifetime...
8   |
9note: the lint level is defined here
10  --> $DIR/one-use-in-inherent-method-argument.rs:1:9
11   |
12LL | #![deny(single_use_lifetimes)]
13   |         ^^^^^^^^^^^^^^^^^^^^
14help: elide the single-use lifetime
15   |
16LL |     fn inherent_a(&self, data: &u32) {
17   |                 --             --
18
19error: lifetime parameter `'f` only used once
20  --> $DIR/one-use-in-inherent-method-argument.rs:11:6
21   |
22LL | impl<'f> Foo<'f> {
23   |      ^^      -- ...is used only here
24   |      |
25   |      this lifetime...
26
27error: aborting due to 2 previous errors
28