about summary refs log tree commit diff
path: root/src/librustc_error_codes/error_codes
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-03-14 04:03:37 +0900
committerGitHub <noreply@github.com>2020-03-14 04:03:37 +0900
commit1d8f5f0ff5882c2a8cd739eb901cea0ea3c437d4 (patch)
tree23b538ed1f3edcd570086442babfd2696634be0a /src/librustc_error_codes/error_codes
parentb0d1fc57eb64ae9cc879902531ae5e287077eb7e (diff)
parenta36bf9c1b87897beb5936bc67c01d121e8f366ec (diff)
downloadrust-1d8f5f0ff5882c2a8cd739eb901cea0ea3c437d4.tar.gz
rust-1d8f5f0ff5882c2a8cd739eb901cea0ea3c437d4.zip
Rollup merge of #69974 - GuillaumeGomez:cleanup-e0434, r=Dylan-DPC
Clean up E0434 explanation

r? @Dylan-DPC
Diffstat (limited to 'src/librustc_error_codes/error_codes')
-rw-r--r--src/librustc_error_codes/error_codes/E0434.md10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/librustc_error_codes/error_codes/E0434.md b/src/librustc_error_codes/error_codes/E0434.md
index e093f0796da..8fd60412baf 100644
--- a/src/librustc_error_codes/error_codes/E0434.md
+++ b/src/librustc_error_codes/error_codes/E0434.md
@@ -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:
 
@@ -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() {
@@ -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() {