]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_error_codes/error_codes/E0434.md
Rollup merge of #70038 - DutchGhost:const-forget-tests, r=RalfJung
[rust.git] / src / librustc_error_codes / error_codes / E0434.md
index e093f0796da5e6aae062b1fe926e4a1ed6099365..8fd60412baf01d9cc05611932f9b1712cb5ff064 100644 (file)
@@ -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() {