1 error: explicit lifetimes given in parameter types where they could be elided
2 --> $DIR/lifetimes.rs:7:1
4 7 | fn distinct_lifetimes<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: u8) { }
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D needless-lifetimes` implied by `-D warnings`
9 error: explicit lifetimes given in parameter types where they could be elided
10 --> $DIR/lifetimes.rs:9:1
12 9 | fn distinct_and_static<'a, 'b>(_x: &'a u8, _y: &'b u8, _z: &'static u8) { }
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: explicit lifetimes given in parameter types where they could be elided
16 --> $DIR/lifetimes.rs:17:1
18 17 | fn in_and_out<'a>(x: &'a u8, _y: u8) -> &'a u8 { x }
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21 error: explicit lifetimes given in parameter types where they could be elided
22 --> $DIR/lifetimes.rs:29:1
24 29 | fn deep_reference_3<'a>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> { Ok(x) }
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 error: explicit lifetimes given in parameter types where they could be elided
28 --> $DIR/lifetimes.rs:32:1
30 32 | fn where_clause_without_lt<'a, T>(x: &'a u8, _y: u8) -> Result<&'a u8, ()> where T: Copy { Ok(x) }
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33 error: explicit lifetimes given in parameter types where they could be elided
34 --> $DIR/lifetimes.rs:38:1
36 38 | fn lifetime_param_2<'a, 'b>(_x: Ref<'a>, _y: &'b u8) { }
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39 error: explicit lifetimes given in parameter types where they could be elided
40 --> $DIR/lifetimes.rs:52:1
42 52 | / fn fn_bound_2<'a, F, I>(_m: Lt<'a, I>, _f: F) -> Lt<'a, I>
43 53 | | where for<'x> F: Fn(Lt<'x, I>) -> Lt<'x, I>
44 54 | | { unreachable!() }
45 | |__________________^
47 error: explicit lifetimes given in parameter types where they could be elided
48 --> $DIR/lifetimes.rs:61:5
50 61 | fn self_and_out<'s>(&'s self) -> &'s u8 { &self.x }
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53 error: explicit lifetimes given in parameter types where they could be elided
54 --> $DIR/lifetimes.rs:65:5
56 65 | fn distinct_self_and_in<'s, 't>(&'s self, _x: &'t u8) { }
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 error: explicit lifetimes given in parameter types where they could be elided
60 --> $DIR/lifetimes.rs:81:1
62 81 | fn struct_with_lt<'a>(_foo: Foo<'a>) -> &'a str { unimplemented!() }
63 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65 error: explicit lifetimes given in parameter types where they could be elided
66 --> $DIR/lifetimes.rs:101:1
68 101 | fn trait_obj_elided2<'a>(_arg: &'a Drop) -> &'a str { unimplemented!() }
69 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
71 error: explicit lifetimes given in parameter types where they could be elided
72 --> $DIR/lifetimes.rs:105:1
74 105 | fn alias_with_lt<'a>(_foo: FooAlias<'a>) -> &'a str { unimplemented!() }
75 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77 error: explicit lifetimes given in parameter types where they could be elided
78 --> $DIR/lifetimes.rs:116:1
80 116 | fn named_input_elided_output<'a>(_arg: &'a str) -> &str { unimplemented!() }
81 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 error: explicit lifetimes given in parameter types where they could be elided
84 --> $DIR/lifetimes.rs:120:1
86 120 | fn trait_bound_ok<'a, T: WithLifetime<'static>>(_: &'a u8, _: T) { unimplemented!() }
87 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 error: aborting due to 14 previous errors