This repository was archived by the owner on May 28, 2025. It is now read-only.
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)
72
72
|
73
73
= help: consider adding the following bound: `'a: 'c`
74
74
75
+ help: add bound `'a: 'b + 'c`
76
+
75
77
error: lifetime may not live long enough
76
78
--> $DIR/outlives-suggestion-simple.rs:31:9
77
79
|
@@ -106,16 +108,16 @@ LL | self.x
106
108
|
107
109
= help: consider adding the following bound: `'b: 'a`
108
110
109
- error[E0521]: borrowed data escapes outside of function
111
+ error[E0521]: borrowed data escapes outside of associated function
110
112
--> $DIR/outlives-suggestion-simple.rs:73:9
111
113
|
112
114
LL | fn get_bar(&self) -> Bar2 {
113
115
| -----
114
116
| |
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
117
119
LL | Bar2::new(&self)
118
- | ^^^^^^^^^^^^^^^^ `self` escapes the function body here
120
+ | ^^^^^^^^^^^^^^^^ `self` escapes the associated function body here
119
121
120
122
error: aborting due to 10 previous errors
121
123
You can’t perform that action at this time.
0 commit comments