Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/librustc_error_codes/error_codes/E0434.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
This error indicates that a variable usage inside an inner function is invalid
because the variable comes from a dynamic environment. Inner functions do not
have access to their containing environment.
A variable used inside an inner function comes from a dynamic environment.

Erroneous code example:

Expand All @@ -14,8 +12,8 @@ fn foo() {
}
```

Functions do not capture local variables. To fix this error, you can replace the
function with a closure:
Inner functions do not have access to their containing environment. To fix this
error, you can replace the function with a closure:

```
fn foo() {
Expand All @@ -26,7 +24,7 @@ fn foo() {
}
```

or replace the captured variable with a constant or a static item:
Or replace the captured variable with a constant or a static item:

```
fn foo() {
Expand Down