rust/tests/ui/lifetimes.stderr
2019-01-08 21:46:39 +01:00

123 lines
4.4 KiB
Plaintext

error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:4:1
|
LL | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:6:1
|
LL | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:14:1
|
LL | / fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 {
LL | | x
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:38:1
|
LL | / fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> {
LL | | Ok(x)
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:43:1
|
LL | / fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()>
LL | | where
LL | | T: Copy,
LL | | {
LL | | Ok(x)
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:54:1
|
LL | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:75:1
|
LL | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
LL | | where
LL | | for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>,
LL | | {
LL | | unreachable!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:108:5
|
LL | / fn self_and_out<'s>(&'s self) -> &'s u8 {
LL | | &self.x
LL | | }
| |_____^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:116:5
|
LL | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:132:1
|
LL | / fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str {
LL | | unimplemented!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:162:1
|
LL | / fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str {
LL | | unimplemented!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:168:1
|
LL | / fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str {
LL | | unimplemented!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:187:1
|
LL | / fn named_input_elided_output<'a>(_arg: &'a str) -> &str {
LL | | unimplemented!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:195:1
|
LL | / fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) {
LL | | unimplemented!()
LL | | }
| |_^
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> $DIR/lifetimes.rs:232:1
|
LL | / fn out_return_type_lts<'a>(e: &'a str) -> Cow<'a> {
LL | | unimplemented!()
LL | | }
| |_^
error: aborting due to 15 previous errors