]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/lifetimes.stderr
Use -Zremap-path-prefix to create system independent paths
[rust.git] / clippy_tests / examples / lifetimes.stderr
1 error: explicit lifetimes given in parameter types where they could be elided
2  --> lifetimes.rs:7:1
3   |
4 7 | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) { }
5   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6   |
7   = note: `-D needless-lifetimes` implied by `-D warnings`
8
9 error: explicit lifetimes given in parameter types where they could be elided
10  --> lifetimes.rs:9:1
11   |
12 9 | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) { }
13   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14   |
15   = note: `-D needless-lifetimes` implied by `-D warnings`
16
17 error: explicit lifetimes given in parameter types where they could be elided
18   --> lifetimes.rs:17:1
19    |
20 17 | fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 { x }
21    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22    |
23    = note: `-D needless-lifetimes` implied by `-D warnings`
24
25 error: explicit lifetimes given in parameter types where they could be elided
26   --> lifetimes.rs:29:1
27    |
28 29 | fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> { Ok(x) }
29    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30    |
31    = note: `-D needless-lifetimes` implied by `-D warnings`
32
33 error: explicit lifetimes given in parameter types where they could be elided
34   --> lifetimes.rs:32:1
35    |
36 32 | fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> where T: Copy { Ok(x) }
37    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38    |
39    = note: `-D needless-lifetimes` implied by `-D warnings`
40
41 error: explicit lifetimes given in parameter types where they could be elided
42   --> lifetimes.rs:38:1
43    |
44 38 | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) { }
45    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46    |
47    = note: `-D needless-lifetimes` implied by `-D warnings`
48
49 error: explicit lifetimes given in parameter types where they could be elided
50   --> lifetimes.rs:52:1
51    |
52 52 | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
53 53 | |     where for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>
54 54 | | { unreachable!() }
55    | |__________________^
56    |
57    = note: `-D needless-lifetimes` implied by `-D warnings`
58
59 error: explicit lifetimes given in parameter types where they could be elided
60   --> lifetimes.rs:61:5
61    |
62 61 |     fn self_and_out<'s>(&'s self) -> &'s u8 { &self.x }
63    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64    |
65    = note: `-D needless-lifetimes` implied by `-D warnings`
66
67 error: explicit lifetimes given in parameter types where they could be elided
68   --> lifetimes.rs:65:5
69    |
70 65 |     fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) { }
71    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72    |
73    = note: `-D needless-lifetimes` implied by `-D warnings`
74
75 error: explicit lifetimes given in parameter types where they could be elided
76   --> lifetimes.rs:81:1
77    |
78 81 | fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str { unimplemented!() }
79    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80    |
81    = note: `-D needless-lifetimes` implied by `-D warnings`
82
83 error: explicit lifetimes given in parameter types where they could be elided
84    --> lifetimes.rs:101:1
85     |
86 101 | fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str { unimplemented!() }
87     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88     |
89     = note: `-D needless-lifetimes` implied by `-D warnings`
90
91 error: explicit lifetimes given in parameter types where they could be elided
92    --> lifetimes.rs:105:1
93     |
94 105 | fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str { unimplemented!() }
95     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96     |
97     = note: `-D needless-lifetimes` implied by `-D warnings`
98
99 error: explicit lifetimes given in parameter types where they could be elided
100    --> lifetimes.rs:116:1
101     |
102 116 | fn named_input_elided_output<'a>(_arg: &'a str) -> &str { unimplemented!() }
103     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104     |
105     = note: `-D needless-lifetimes` implied by `-D warnings`
106
107 error: explicit lifetimes given in parameter types where they could be elided
108    --> lifetimes.rs:120:1
109     |
110 120 | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) { unimplemented!() }
111     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112     |
113     = note: `-D needless-lifetimes` implied by `-D warnings`
114
115 error: aborting due to 14 previous errors
116
117 error: Could not compile `clippy_tests`.
118
119 To learn more, run the command again with --verbose.