Skip to content

Commit

Permalink
Apply suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Oct 13, 2019
1 parent e0ef776 commit c6cc29d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/librustc/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2012,11 +2012,11 @@ fn main() {
}
```
Closures cannot be used as `static`. They "save" the environment.
Therefore, having a static closure with a static environment doesn't
really make sense since all you can capture inside it would be variables
with static lifetime. In this condition, better use a function directly.
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.
"##,

E0698: r##"
Expand Down

0 comments on commit c6cc29d

Please sign in to comment.