We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0ef776 commit c6cc29dCopy full SHA for c6cc29d
src/librustc/error_codes.rs
@@ -2012,11 +2012,11 @@ fn main() {
2012
}
2013
```
2014
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.
+Closures cannot be used as `static`. They "save" the environment,
+and as such a static closure would save only a static environment
+which would consist only of variables with a static lifetime. Given
+this it would be better to use a proper function. The easiest fix
+is to remove the `static` keyword.
2020
"##,
2021
2022
E0698: r##"
0 commit comments