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