]> git.lizzy.rs Git - rust.git/blob - tests/ui/lifetimes.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / lifetimes.stderr
1 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
2   --> $DIR/lifetimes.rs:13:1
3    |
4 13 | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}
5    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
8
9 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
10   --> $DIR/lifetimes.rs:15:1
11    |
12 15 | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
13    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
16   --> $DIR/lifetimes.rs:23:1
17    |
18 23 | / fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
19 24 | |     x
20 25 | | }
21    | |_^
22
23 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
24   --> $DIR/lifetimes.rs:47:1
25    |
26 47 | / fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
27 48 | |     Ok(x)
28 49 | | }
29    | |_^
30
31 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
32   --> $DIR/lifetimes.rs:52:1
33    |
34 52 | / fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
35 53 | | where
36 54 | |     T: Copy,
37 55 | | {
38 56 | |     Ok(x)
39 57 | | }
40    | |_^
41
42 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
43   --> $DIR/lifetimes.rs:63:1
44    |
45 63 | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
46    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47
48 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
49   --> $DIR/lifetimes.rs:84:1
50    |
51 84 | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
52 85 | | where
53 86 | |     for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>,
54 87 | | {
55 88 | |     unreachable!()
56 89 | | }
57    | |_^
58
59 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
60    --> $DIR/lifetimes.rs:117:5
61     |
62 117 | /     fn self_and_out<'s>(&'s self) -> &'s u8 {
63 118 | |         &self.x
64 119 | |     }
65     | |_____^
66
67 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
68    --> $DIR/lifetimes.rs:125:5
69     |
70 125 |     fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
71     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72
73 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
74    --> $DIR/lifetimes.rs:141:1
75     |
76 141 | / fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
77 142 | |     unimplemented!()
78 143 | | }
79     | |_^
80
81 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
82    --> $DIR/lifetimes.rs:171:1
83     |
84 171 | / fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str {
85 172 | |     unimplemented!()
86 173 | | }
87     | |_^
88
89 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
90    --> $DIR/lifetimes.rs:177:1
91     |
92 177 | / fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
93 178 | |     unimplemented!()
94 179 | | }
95     | |_^
96
97 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
98    --> $DIR/lifetimes.rs:196:1
99     |
100 196 | / fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
101 197 | |     unimplemented!()
102 198 | | }
103     | |_^
104
105 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
106    --> $DIR/lifetimes.rs:204:1
107     |
108 204 | / fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
109 205 | |     unimplemented!()
110 206 | | }
111     | |_^
112
113 error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
114    --> $DIR/lifetimes.rs:241:1
115     |
116 241 | / fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
117 242 | |     unimplemented!()
118 243 | | }
119     | |_^
120
121 error: aborting due to 15 previous errors
122