File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ LL | (x, x)
7272 |
7373 = help: consider adding the following bound: `'a: 'c`
7474
75+ help: add bound `'a: 'b + 'c`
76+
7577error: lifetime may not live long enough
7678 --> $DIR/outlives-suggestion-simple.rs:31:9
7779 |
@@ -106,16 +108,16 @@ LL | self.x
106108 |
107109 = help: consider adding the following bound: `'b: 'a`
108110
109- error[E0521]: borrowed data escapes outside of function
111+ error[E0521]: borrowed data escapes outside of associated function
110112 --> $DIR/outlives-suggestion-simple.rs:73:9
111113 |
112114LL | fn get_bar(&self) -> Bar2 {
113115 | -----
114116 | |
115- | `self` is declared here, outside of the function body
116- | `self` is a reference that is only valid in the function body
117+ | `self` declared here, outside of the associated function body
118+ | `self` is a reference that is only valid in the associated function body
117119LL | Bar2::new(&self)
118- | ^^^^^^^^^^^^^^^^ `self` escapes the function body here
120+ | ^^^^^^^^^^^^^^^^ `self` escapes the associated function body here
119121
120122error: aborting due to 10 previous errors
121123
You can’t perform that action at this time.
0 commit comments