Skip to content

Commit c6cc29d

Browse files
committed
Apply suggestion
1 parent e0ef776 commit c6cc29d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/librustc/error_codes.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2012,11 +2012,11 @@ fn main() {
20122012
}
20132013
```
20142014
2015-
Closures cannot be used as `static`. They "save" the environment.
2016-
Therefore, having a static closure with a static environment doesn't
2017-
really make sense since all you can capture inside it would be variables
2018-
with static lifetime. In this condition, better use a function directly.
2019-
The easiest fix is to remove `static` keyword.
2015+
Closures cannot be used as `static`. They "save" the environment,
2016+
and as such a static closure would save only a static environment
2017+
which would consist only of variables with a static lifetime. Given
2018+
this it would be better to use a proper function. The easiest fix
2019+
is to remove the `static` keyword.
20202020
"##,
20212021

20222022
E0698: r##"

0 commit comments

Comments
 (0)