]> git.proxmox.com Git - rustc.git/blame - src/test/ui/self/elision/ref-struct.nll.stderr
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / self / elision / ref-struct.nll.stderr
CommitLineData
dc9dc135 1error: lifetime may not live long enough
60c5eb7d 2 --> $DIR/ref-struct.rs:11:9
dc9dc135
XL
3 |
4LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
5 | - - let's call the lifetime of this reference `'1`
6 | |
7 | let's call the lifetime of this reference `'2`
8LL | f
ba9703b0 9 | ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
dc9dc135
XL
10
11error: lifetime may not live long enough
60c5eb7d 12 --> $DIR/ref-struct.rs:15:9
dc9dc135
XL
13 |
14LL | fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
15 | - - let's call the lifetime of this reference `'1`
16 | |
17 | let's call the lifetime of this reference `'2`
18LL | f
ba9703b0 19 | ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
dc9dc135
XL
20
21error: lifetime may not live long enough
60c5eb7d 22 --> $DIR/ref-struct.rs:19:9
dc9dc135
XL
23 |
24LL | fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
25 | - - let's call the lifetime of this reference `'1`
26 | |
27 | let's call the lifetime of this reference `'2`
28LL | f
ba9703b0 29 | ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
dc9dc135
XL
30
31error: lifetime may not live long enough
60c5eb7d 32 --> $DIR/ref-struct.rs:23:9
dc9dc135
XL
33 |
34LL | fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
35 | - - let's call the lifetime of this reference `'1`
36 | |
37 | let's call the lifetime of this reference `'2`
38LL | f
ba9703b0 39 | ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
dc9dc135
XL
40
41error: lifetime may not live long enough
60c5eb7d 42 --> $DIR/ref-struct.rs:27:9
dc9dc135
XL
43 |
44LL | fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
45 | - - let's call the lifetime of this reference `'1`
46 | |
47 | let's call the lifetime of this reference `'2`
48LL | f
ba9703b0 49 | ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
dc9dc135
XL
50
51error: aborting due to 5 previous errors
52