1 error: lifetime may not live long enough
2 --> $DIR/issue-98170.rs:7:9
4 LL | impl MyStruct<'_> {
5 | -- lifetime `'1` appears in the `impl`'s self type
6 LL | pub fn new<'a>(field: &'a [u32]) -> MyStruct<'a> {
7 | -- lifetime `'a` defined here
9 | ^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
11 error: lifetime may not live long enough
12 --> $DIR/issue-98170.rs:7:16
14 LL | impl MyStruct<'_> {
15 | -- lifetime `'1` appears in the `impl`'s self type
16 LL | pub fn new<'a>(field: &'a [u32]) -> MyStruct<'a> {
17 | -- lifetime `'a` defined here
19 | ^^^^^ this usage requires that `'a` must outlive `'1`
21 error: lifetime may not live long enough
22 --> $DIR/issue-98170.rs:19:9
24 LL | impl<'a> Trait<'a> for MyStruct<'_> {
25 | -- -- lifetime `'1` appears in the `impl`'s self type
27 | lifetime `'a` defined here
28 LL | fn new(field: &'a [u32]) -> MyStruct<'a> {
30 | ^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
32 error: lifetime may not live long enough
33 --> $DIR/issue-98170.rs:19:16
35 LL | impl<'a> Trait<'a> for MyStruct<'_> {
36 | -- -- lifetime `'1` appears in the `impl`'s self type
38 | lifetime `'a` defined here
39 LL | fn new(field: &'a [u32]) -> MyStruct<'a> {
41 | ^^^^^ this usage requires that `'a` must outlive `'1`
43 error: aborting due to 4 previous errors