2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:13:1
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
13 | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:15:1
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
15 | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:23:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
23 | / fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
|
|
|
|
24 | | x
|
|
|
|
25 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:47:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
47 | / fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
|
|
|
|
48 | | Ok(x)
|
|
|
|
49 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:52:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
52 | / fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
|
|
|
|
53 | | where
|
|
|
|
54 | | T: Copy,
|
|
|
|
55 | | {
|
|
|
|
56 | | Ok(x)
|
|
|
|
57 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:63:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
63 | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:84:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
84 | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
|
|
|
|
85 | | where
|
|
|
|
86 | | for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>,
|
|
|
|
87 | | {
|
|
|
|
88 | | unreachable!()
|
|
|
|
89 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:117:5
|
|
|
|
|
|
|
|
|
117 | / fn self_and_out<'s>(&'s self) -> &'s u8 {
|
|
|
|
118 | | &self.x
|
|
|
|
119 | | }
|
|
|
|
| |_____^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:125:5
|
|
|
|
|
|
|
|
|
125 | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:141:1
|
2018-10-06 11:18:06 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
141 | / fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
|
|
|
|
142 | | unimplemented!()
|
|
|
|
143 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:171:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
171 | / fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str {
|
|
|
|
172 | | unimplemented!()
|
|
|
|
173 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:177:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
177 | / fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
|
|
|
|
178 | | unimplemented!()
|
|
|
|
179 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:196:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
196 | / fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
|
|
|
|
197 | | unimplemented!()
|
|
|
|
198 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:204:1
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
204 | / fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
|
|
|
|
205 | | unimplemented!()
|
|
|
|
206 | | }
|
|
|
|
| |_^
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-10-08 03:43:13 -05:00
|
|
|
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/lifetimes.rs:241:1
|
2018-10-08 03:43:13 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
241 | / fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
|
|
|
|
242 | | unimplemented!()
|
|
|
|
243 | | }
|
|
|
|
| |_^
|
2018-10-08 03:43:13 -05:00
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|